This commit was manufactured by cvs2svn to create tag

'release_2_0_1'.

git-svn-id: file:///svn/phpbb/tags/release_2_0_1@2610 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
(no author) 2002-05-20 13:52:12 +00:00
parent a676b8fdf8
commit 012267ad5e
536 changed files with 15920 additions and 10966 deletions

View file

@ -23,9 +23,9 @@ if( !empty($setmodules) )
// //
// Let's set the root dir for phpBB // Let's set the root dir for phpBB
// //
$phpbb_root_path = "../"; $phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc'); require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx); require('./pagestart.' . $phpEx);
include($phpbb_root_path . 'includes/functions_selects.'.$phpEx); include($phpbb_root_path . 'includes/functions_selects.'.$phpEx);
// //
@ -311,6 +311,6 @@ $template->assign_vars(array(
$template->pparse("body"); $template->pparse("body");
include('page_footer_admin.'.$phpEx); include('./page_footer_admin.'.$phpEx);
?> ?>

View file

@ -42,6 +42,7 @@ if( !empty($setmodules) )
{ {
$file_uploads = @get_cfg_var('file_uploads'); $file_uploads = @get_cfg_var('file_uploads');
} }
if( ($file_uploads != 0 || empty($file_uploads)) && (strtolower($file_uploads) != 'off') && (@phpversion() != '4.0.4pl1') ) if( ($file_uploads != 0 || empty($file_uploads)) && (strtolower($file_uploads) != 'off') && (@phpversion() != '4.0.4pl1') )
{ {
$module['General']['Restore_DB'] = $filename . "?perform=restore"; $module['General']['Restore_DB'] = $filename . "?perform=restore";
@ -54,9 +55,9 @@ if( !empty($setmodules) )
// Load default header // Load default header
// //
$no_page_header = TRUE; $no_page_header = TRUE;
$phpbb_root_path = "../"; $phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc'); require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx); require('./pagestart.' . $phpEx);
include($phpbb_root_path . 'includes/sql_parse.'.$phpEx); include($phpbb_root_path . 'includes/sql_parse.'.$phpEx);
// //
@ -695,7 +696,7 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
break; break;
} }
include('page_header_admin.'.$phpEx); include('./page_header_admin.'.$phpEx);
$template->set_filenames(array( $template->set_filenames(array(
"body" => "admin/admin_message_body.tpl") "body" => "admin/admin_message_body.tpl")
@ -740,12 +741,11 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
if( !isset($HTTP_POST_VARS['backupstart']) && !isset($HTTP_GET_VARS['backupstart'])) if( !isset($HTTP_POST_VARS['backupstart']) && !isset($HTTP_GET_VARS['backupstart']))
{ {
include('page_header_admin.'.$phpEx); include('./page_header_admin.'.$phpEx);
$template->set_filenames(array( $template->set_filenames(array(
"body" => "admin/db_utils_backup_body.tpl") "body" => "admin/db_utils_backup_body.tpl")
); );
$s_hidden_fields = "<input type=\"hidden\" name=\"perform\" value=\"backup\" /><input type=\"hidden\" name=\"drop\" value=\"1\" /><input type=\"hidden\" name=\"perform\" value=\"$perform\" />"; $s_hidden_fields = "<input type=\"hidden\" name=\"perform\" value=\"backup\" /><input type=\"hidden\" name=\"drop\" value=\"1\" /><input type=\"hidden\" name=\"perform\" value=\"$perform\" />";
$template->assign_vars(array( $template->assign_vars(array(
@ -771,22 +771,26 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
} }
else if( !isset($HTTP_POST_VARS['startdownload']) && !isset($HTTP_GET_VARS['startdownload']) ) else if( !isset($HTTP_POST_VARS['startdownload']) && !isset($HTTP_GET_VARS['startdownload']) )
{ {
if(is_array($additional_tables))
{
$additional_tables = implode(',', $additional_tables);
}
$template->set_filenames(array( $template->set_filenames(array(
"body" => "admin/admin_message_body.tpl") "body" => "admin/admin_message_body.tpl")
); );
$template->assign_vars(array( $template->assign_vars(array(
"META" => "<meta http-equiv=\"refresh\" content=\"0;url=admin_db_utilities.$phpEx?perform=backup&amp;additional_tables=" . quotemeta($additional_tables) . "&amp;backup_type=$backup_type&amp;drop=1&amp;backupstart=1&amp;gzipcompress=$gzipcompress&amp;startdownload=1\">", "META" => "<meta http-equiv=\"refresh\" content=\"2;url=admin_db_utilities.$phpEx?perform=backup&additional_tables=" . quotemeta($additional_tables) . "&backup_type=$backup_type&drop=1&amp;backupstart=1&gzipcompress=$gzipcompress&startdownload=1\">",
"MESSAGE_TITLE" => $lang['Database_Utilities'] . " : " . $lang['Backup'], "MESSAGE_TITLE" => $lang['Database_Utilities'] . " : " . $lang['Backup'],
"MESSAGE_TEXT" => $lang['Backup_download']) "MESSAGE_TEXT" => $lang['Backup_download'])
); );
include('page_header_admin.php'); include('./page_header_admin.'.$phpEx);
$template->pparse("body"); $template->pparse("body");
include('page_footer_admin.'.$phpEx); include('./page_footer_admin.'.$phpEx);
} }
header("Pragma: no-cache"); header("Pragma: no-cache");
@ -807,7 +811,7 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
{ {
@ob_start(); @ob_start();
@ob_implicit_flush(0); @ob_implicit_flush(0);
header("Content-Type: text/x-delimtext; name=\"phpbb_db_backup.sql.gz\""); header("Content-Type: application/x-gzip; name=\"phpbb_db_backup.sql.gz\"");
header("Content-disposition: attachment; filename=phpbb_db_backup.sql.gz"); header("Content-disposition: attachment; filename=phpbb_db_backup.sql.gz");
} }
else else
@ -873,7 +877,7 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
// //
// Define Template files... // Define Template files...
// //
include('page_header_admin.'.$phpEx); include('./page_header_admin.'.$phpEx);
$template->set_filenames(array( $template->set_filenames(array(
"body" => "admin/db_utils_restore_body.tpl") "body" => "admin/db_utils_restore_body.tpl")
@ -907,7 +911,6 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
if($backup_file_tmpname == "" || $backup_file_name == "") if($backup_file_tmpname == "" || $backup_file_name == "")
{ {
include('page_header_admin.'.$phpEx);
message_die(GENERAL_MESSAGE, $lang['Restore_Error_no_file']); message_die(GENERAL_MESSAGE, $lang['Restore_Error_no_file']);
} }
// //
@ -943,7 +946,6 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
} }
else else
{ {
include('page_header_admin.'.$phpEx);
message_die(GENERAL_ERROR, $lang['Restore_Error_decompress']); message_die(GENERAL_ERROR, $lang['Restore_Error_decompress']);
} }
} }
@ -958,13 +960,11 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
} }
else else
{ {
include('page_header_admin.'.$phpEx);
message_die(GENERAL_ERROR, $lang['Restore_Error_filename'] ." $backup_file_type $backup_file_name"); message_die(GENERAL_ERROR, $lang['Restore_Error_filename'] ." $backup_file_type $backup_file_name");
} }
} }
else else
{ {
include('page_header_admin.'.$phpEx);
message_die(GENERAL_ERROR, $lang['Restore_Error_uploading']); message_die(GENERAL_ERROR, $lang['Restore_Error_uploading']);
} }
@ -991,15 +991,13 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
if(!$result && ( !(SQL_LAYER == 'postgresql' && eregi("drop table", $sql) ) ) ) if(!$result && ( !(SQL_LAYER == 'postgresql' && eregi("drop table", $sql) ) ) )
{ {
//include('page_header_admin.'.$phpEx);
// echo "~~$sql~~";
message_die(GENERAL_ERROR, "Error importing backup file", "", __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, "Error importing backup file", "", __LINE__, __FILE__, $sql);
} }
} }
} }
} }
include('page_header_admin.'.$phpEx); include('./page_header_admin.'.$phpEx);
$template->set_filenames(array( $template->set_filenames(array(
"body" => "admin/admin_message_body.tpl") "body" => "admin/admin_message_body.tpl")
@ -1019,6 +1017,6 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
} }
} }
include('page_footer_admin.'.$phpEx); include('./page_footer_admin.'.$phpEx);
?> ?>

View file

@ -33,16 +33,15 @@ if( !empty($setmodules) )
// //
// Include required files, get $phpEx and check permissions // Include required files, get $phpEx and check permissions
// //
$phpbb_root_path = "../"; $phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc'); require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx); require('./pagestart.' . $phpEx);
if( isset($HTTP_POST_VARS['add_name']) ) if( isset($HTTP_POST_VARS['add_name']) )
{ {
include($phpbb_root_path . 'includes/functions_validate.'.$phpEx); include($phpbb_root_path . 'includes/functions_validate.'.$phpEx);
$disallowed_user = ( isset($HTTP_POST_VARS['disallowed_user']) ) ? $HTTP_POST_VARS['disallowed_user'] : $HTTP_GET_VARS['disallowed_user']; $disallowed_user = ( isset($HTTP_POST_VARS['disallowed_user']) ) ? $HTTP_POST_VARS['disallowed_user'] : $HTTP_GET_VARS['disallowed_user'];
$disallowed_user = preg_replace( '/\*/', '%', $disallowed_user );
if( !validate_username($disallowed_user) ) if( !validate_username($disallowed_user) )
{ {
@ -110,8 +109,6 @@ else
$user = array(); $user = array();
for( $i = 0; $i < count($disallowed); $i++ ) for( $i = 0; $i < count($disallowed); $i++ )
{ {
$disallowed[$i]['disallow_username'] = preg_replace('/%/', '*', $disallowed[$i]['disallow_username']);
$disallow_select .= '<option value="' . $disallowed[$i]['disallow_id'] . '">' . $disallowed[$i]['disallow_username'] . '</option>'; $disallow_select .= '<option value="' . $disallowed[$i]['disallow_id'] . '">' . $disallowed[$i]['disallow_username'] . '</option>';
} }
} }
@ -140,4 +137,6 @@ $template->assign_vars(array(
$template->pparse("body"); $template->pparse("body");
include('./page_footer_admin.'.$phpEx);
?> ?>

View file

@ -32,9 +32,9 @@ if ( !empty($setmodules) )
// //
// Load default header // Load default header
// //
$phpbb_root_path = '../'; $phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc'); require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx); require('./pagestart.' . $phpEx);
require($phpbb_root_path . 'includes/prune.'.$phpEx); require($phpbb_root_path . 'includes/prune.'.$phpEx);
require($phpbb_root_path . 'includes/functions_admin.'.$phpEx); require($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
@ -178,6 +178,7 @@ else
$template->assign_vars(array( $template->assign_vars(array(
'FORUM_NAME' => $forum_name, 'FORUM_NAME' => $forum_name,
'L_FORUM' => $lang['Forum'],
'L_FORUM_PRUNE' => $lang['Forum_Prune'], 'L_FORUM_PRUNE' => $lang['Forum_Prune'],
'L_FORUM_PRUNE_EXPLAIN' => $lang['Forum_Prune_explain'], 'L_FORUM_PRUNE_EXPLAIN' => $lang['Forum_Prune_explain'],
'L_DO_PRUNE' => $lang['Do_Prune'], 'L_DO_PRUNE' => $lang['Do_Prune'],
@ -193,6 +194,6 @@ else
// //
$template->pparse('body'); $template->pparse('body');
include('page_footer_admin.'.$phpEx); include('./page_footer_admin.'.$phpEx);
?> ?>

View file

@ -34,9 +34,9 @@ if( !empty($setmodules) )
// Load default header // Load default header
// //
$no_page_header = TRUE; $no_page_header = TRUE;
$phpbb_root_path = "../"; $phpbb_root_path = './../';
require($phpbb_root_path . 'extension.inc'); require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx); require('./pagestart.' . $phpEx);
// //
// Start program - define vars // Start program - define vars
@ -52,23 +52,23 @@ $simple_auth_ary = array(
6 => array(AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD), 6 => array(AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD, AUTH_MOD),
); );
$simple_auth_types = array($lang['Public'], $lang['Registered'], $lang['Registered'] . " [" . $lang['Hidden'] . "]", $lang['Private'], $lang['Private'] . " [" . $lang['Hidden'] . "]", $lang['Moderators'], $lang['Moderators'] . " [" . $lang['Hidden'] . "]"); $simple_auth_types = array($lang['Public'], $lang['Registered'], $lang['Registered'] . ' [' . $lang['Hidden'] . ']', $lang['Private'], $lang['Private'] . ' [' . $lang['Hidden'] . ']', $lang['Moderators'], $lang['Moderators'] . ' [' . $lang['Hidden'] . ']');
$forum_auth_fields = array("auth_view", "auth_read", "auth_post", "auth_reply", "auth_edit", "auth_delete", "auth_sticky", "auth_announce", "auth_vote", "auth_pollcreate"); $forum_auth_fields = array('auth_view', 'auth_read', 'auth_post', 'auth_reply', 'auth_edit', 'auth_delete', 'auth_sticky', 'auth_announce', 'auth_vote', 'auth_pollcreate');
$field_names = array( $field_names = array(
"auth_view" => $lang['View'], 'auth_view' => $lang['View'],
"auth_read" => $lang['Read'], 'auth_read' => $lang['Read'],
"auth_post" => $lang['Post'], 'auth_post' => $lang['Post'],
"auth_reply" => $lang['Reply'], 'auth_reply' => $lang['Reply'],
"auth_edit" => $lang['Edit'], 'auth_edit' => $lang['Edit'],
"auth_delete" => $lang['Delete'], 'auth_delete' => $lang['Delete'],
"auth_sticky" => $lang['Sticky'], 'auth_sticky' => $lang['Sticky'],
"auth_announce" => $lang['Announce'], 'auth_announce' => $lang['Announce'],
"auth_vote" => $lang['Vote'], 'auth_vote' => $lang['Vote'],
"auth_pollcreate" => $lang['Pollcreate']); 'auth_pollcreate' => $lang['Pollcreate']);
$forum_auth_levels = array("ALL", "REG", "PRIVATE", "MOD", "ADMIN"); $forum_auth_levels = array('ALL', 'REG', 'PRIVATE', 'MOD', 'ADMIN');
$forum_auth_const = array(AUTH_ALL, AUTH_REG, AUTH_ACL, AUTH_MOD, AUTH_ADMIN); $forum_auth_const = array(AUTH_ALL, AUTH_REG, AUTH_ACL, AUTH_MOD, AUTH_ADMIN);
if(isset($HTTP_GET_VARS[POST_FORUM_URL]) || isset($HTTP_POST_VARS[POST_FORUM_URL])) if(isset($HTTP_GET_VARS[POST_FORUM_URL]) || isset($HTTP_POST_VARS[POST_FORUM_URL]))
@ -79,7 +79,7 @@ if(isset($HTTP_GET_VARS[POST_FORUM_URL]) || isset($HTTP_POST_VARS[POST_FORUM_URL
else else
{ {
unset($forum_id); unset($forum_id);
$forum_sql = ""; $forum_sql = '';
} }
if( isset($HTTP_GET_VARS['adv']) ) if( isset($HTTP_GET_VARS['adv']) )
@ -96,23 +96,17 @@ else
// //
if( isset($HTTP_POST_VARS['submit']) ) if( isset($HTTP_POST_VARS['submit']) )
{ {
$sql = ""; $sql = '';
if(!empty($forum_id)) if(!empty($forum_id))
{ {
$sql = "UPDATE " . FORUMS_TABLE . " SET ";
if(isset($HTTP_POST_VARS['simpleauth'])) if(isset($HTTP_POST_VARS['simpleauth']))
{ {
$simple_ary = $simple_auth_ary[$HTTP_POST_VARS['simpleauth']]; $simple_ary = $simple_auth_ary[$HTTP_POST_VARS['simpleauth']];
for($i = 0; $i < count($simple_ary); $i++) for($i = 0; $i < count($simple_ary); $i++)
{ {
$sql .= $forum_auth_fields[$i] . " = " . $simple_ary[$i]; $sql .= ( ( $sql != '' ) ? ', ' : '' ) . $forum_auth_fields[$i] . ' = ' . $simple_ary[$i];
if($i < count($simple_ary) - 1)
{
$sql .= ", ";
}
} }
$sql .= " WHERE forum_id = $forum_id"; $sql .= " WHERE forum_id = $forum_id";
@ -123,39 +117,34 @@ if( isset($HTTP_POST_VARS['submit']) )
{ {
$value = $HTTP_POST_VARS[$forum_auth_fields[$i]]; $value = $HTTP_POST_VARS[$forum_auth_fields[$i]];
if($forum_auth_fields[$i] == 'auth_vote') if ( $forum_auth_fields[$i] == 'auth_vote' )
{ {
if( $HTTP_POST_VARS['auth_vote'] == AUTH_ALL ) if ( $HTTP_POST_VARS['auth_vote'] == AUTH_ALL )
{ {
$value = AUTH_REG; $value = AUTH_REG;
} }
} }
$sql .= $forum_auth_fields[$i] . " = " . $value; $sql .= ( ( $sql != '' ) ? ', ' : '' ) .$forum_auth_fields[$i] . ' = ' . $value;
if($i < count($forum_auth_fields) - 1)
{
$sql .= ", ";
}
} }
$sql .= " WHERE forum_id = $forum_id"; $sql = "UPDATE " . FORUMS_TABLE . " SET $sql WHERE forum_id = $forum_id";
} }
if($sql != "") if ( $sql != '' )
{ {
if(!$db->sql_query($sql)) if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, "Couldn't update auth table!", "", __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Could not update auth table', '', __LINE__, __FILE__, $sql);
} }
} }
$forum_sql = ""; $forum_sql = '';
$adv = 0; $adv = 0;
} }
$template->assign_vars(array( $template->assign_vars(array(
"META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("admin_forumauth.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">') 'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("admin_forumauth.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">')
); );
$message = $lang['Forum_auth_updated'] . '<br /><br />' . sprintf($lang['Click_return_forumauth'], '<a href="' . append_sid("admin_forumauth.$phpEx") . '">', "</a>"); $message = $lang['Forum_auth_updated'] . '<br /><br />' . sprintf($lang['Click_return_forumauth'], '<a href="' . append_sid("admin_forumauth.$phpEx") . '">', "</a>");
message_die(GENERAL_MESSAGE, $message); message_die(GENERAL_MESSAGE, $message);
@ -187,7 +176,7 @@ if( empty($forum_id) )
// specified // specified
// //
$template->set_filenames(array( $template->set_filenames(array(
"body" => "admin/auth_select_body.tpl") 'body' => 'admin/auth_select_body.tpl')
); );
$select_list = '<select name="' . POST_FORUM_URL . '">'; $select_list = '<select name="' . POST_FORUM_URL . '">';
@ -198,13 +187,13 @@ if( empty($forum_id) )
$select_list .= '</select>'; $select_list .= '</select>';
$template->assign_vars(array( $template->assign_vars(array(
"L_AUTH_TITLE" => $lang['Auth_Control_Forum'], 'L_AUTH_TITLE' => $lang['Auth_Control_Forum'],
"L_AUTH_EXPLAIN" => $lang['Forum_auth_explain'], 'L_AUTH_EXPLAIN' => $lang['Forum_auth_explain'],
"L_AUTH_SELECT" => $lang['Select_a_Forum'], 'L_AUTH_SELECT' => $lang['Select_a_Forum'],
"L_LOOK_UP" => $lang['Look_up_Forum'], 'L_LOOK_UP' => $lang['Look_up_Forum'],
"S_AUTH_ACTION" => append_sid("admin_forumauth.$phpEx"), 'S_AUTH_ACTION' => append_sid("admin_forumauth.$phpEx"),
"S_AUTH_SELECT" => $select_list) 'S_AUTH_SELECT' => $select_list)
); );
} }
@ -215,7 +204,7 @@ else
// specified // specified
// //
$template->set_filenames(array( $template->set_filenames(array(
"body" => "admin/auth_forum_body.tpl") 'body' => 'admin/auth_forum_body.tpl')
); );
$forum_name = $forum_rows[0]['forum_name']; $forum_name = $forum_rows[0]['forum_name'];
@ -244,38 +233,30 @@ else
// If we didn't get a match above then we // If we didn't get a match above then we
// automatically switch into 'advanced' mode // automatically switch into 'advanced' mode
// //
if(!isset($adv) && !$matched) if ( !isset($adv) && !$matched )
{ {
$adv = 1; $adv = 1;
} }
$s_column_span == 0; $s_column_span == 0;
if( empty($adv) ) if ( empty($adv) )
{ {
$simple_auth = "<select name=\"simpleauth\">"; $simple_auth = '<select name="simpleauth">';
for($j = 0; $j < count($simple_auth_types); $j++) for($j = 0; $j < count($simple_auth_types); $j++)
{ {
if($matched_type == $j) $selected = ( $matched_type == $j ) ? ' selected="selected"' : '';
{ $simple_auth .= '<option value="' . $j . '"' . $selected . '>' . $simple_auth_types[$j] . '</option>';
$simple_auth .= "<option value=\"$j\" selected>";
$simple_auth .= $simple_auth_types[$j];
$simple_auth .= "</option>";
}
else
{
$simple_auth .= "<option value=\"$j\">" . $simple_auth_types[$j] . "</option>";
}
} }
$simple_auth .= "</select>"; $simple_auth .= '</select>';
$template->assign_block_vars("forum_auth_titles", array( $template->assign_block_vars('forum_auth_titles', array(
"CELL_TITLE" => $lang['Simple_mode']) 'CELL_TITLE' => $lang['Simple_mode'])
); );
$template->assign_block_vars("forum_auth_data", array( $template->assign_block_vars('forum_auth_data', array(
"S_AUTH_LEVELS_SELECT" => $simple_auth) 'S_AUTH_LEVELS_SELECT' => $simple_auth)
); );
$s_column_span++; $s_column_span++;
@ -288,37 +269,29 @@ else
// //
for($j = 0; $j < count($forum_auth_fields); $j++) for($j = 0; $j < count($forum_auth_fields); $j++)
{ {
$custom_auth[$j] = "&nbsp;<select name=\"" . $forum_auth_fields[$j] . "\">"; $custom_auth[$j] = '&nbsp;<select name="' . $forum_auth_fields[$j] . '">';
for($k = 0; $k < count($forum_auth_levels); $k++) for($k = 0; $k < count($forum_auth_levels); $k++)
{ {
if ( $forum_rows[0][$forum_auth_fields[$j]] == $forum_auth_const[$k] ) $selected = ( $forum_rows[0][$forum_auth_fields[$j]] == $forum_auth_const[$k] ) ? ' selected="selected"' : '';
{ $custom_auth[$j] .= '<option value="' . $forum_auth_const[$k] . '"' . $selected . '>' . $lang['Forum_' . $forum_auth_levels[$k]] . '</option>';
$custom_auth[$j] .= "<option value=\"" . $forum_auth_const[$k] . "\" selected>";
$custom_auth[$j] .= $lang['Forum_' . $forum_auth_levels[$k]];
$custom_auth[$j] .= "</option>";
}
else
{
$custom_auth[$j] .= "<option value=\"" . $forum_auth_const[$k] . "\">". $lang['Forum_' . $forum_auth_levels[$k]] . "</option>";
}
} }
$custom_auth[$j] .= "</select>&nbsp;"; $custom_auth[$j] .= '</select>&nbsp;';
$cell_title = $field_names[$forum_auth_fields[$j]]; $cell_title = $field_names[$forum_auth_fields[$j]];
$template->assign_block_vars("forum_auth_titles", array( $template->assign_block_vars('forum_auth_titles', array(
"CELL_TITLE" => $cell_title) 'CELL_TITLE' => $cell_title)
); );
$template->assign_block_vars("forum_auth_data", array( $template->assign_block_vars('forum_auth_data', array(
"S_AUTH_LEVELS_SELECT" => $custom_auth[$j]) 'S_AUTH_LEVELS_SELECT' => $custom_auth[$j])
); );
$s_column_span++; $s_column_span++;
} }
} }
$adv_mode = (empty($adv)) ? "1" : "0"; $adv_mode = ( empty($adv) ) ? '1' : '0';
$switch_mode = append_sid("admin_forumauth.$phpEx?" . POST_FORUM_URL . "=" . $forum_id . "&adv=". $adv_mode); $switch_mode = append_sid("admin_forumauth.$phpEx?" . POST_FORUM_URL . "=" . $forum_id . "&adv=". $adv_mode);
$switch_mode_text = ( empty($adv) ) ? $lang['Advanced_mode'] : $lang['Simple_mode']; $switch_mode_text = ( empty($adv) ) ? $lang['Advanced_mode'] : $lang['Simple_mode'];
$u_switch_mode = '<a href="' . $switch_mode . '">' . $switch_mode_text . '</a>'; $u_switch_mode = '<a href="' . $switch_mode . '">' . $switch_mode_text . '</a>';
@ -326,26 +299,27 @@ else
$s_hidden_fields = '<input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '">'; $s_hidden_fields = '<input type="hidden" name="' . POST_FORUM_URL . '" value="' . $forum_id . '">';
$template->assign_vars(array( $template->assign_vars(array(
"FORUM_NAME" => $forum_name, 'FORUM_NAME' => $forum_name,
"L_AUTH_TITLE" => $lang['Auth_Control_Forum'], 'L_FORUM' => $lang['Forum'],
"L_AUTH_EXPLAIN" => $lang['Forum_auth_explain'], 'L_AUTH_TITLE' => $lang['Auth_Control_Forum'],
"L_SUBMIT" => $lang['Submit'], 'L_AUTH_EXPLAIN' => $lang['Forum_auth_explain'],
"L_RESET" => $lang['Reset'], 'L_SUBMIT' => $lang['Submit'],
'L_RESET' => $lang['Reset'],
"U_SWITCH_MODE" => $u_switch_mode, 'U_SWITCH_MODE' => $u_switch_mode,
"S_FORUMAUTH_ACTION" => append_sid("admin_forumauth.$phpEx"), 'S_FORUMAUTH_ACTION' => append_sid("admin_forumauth.$phpEx"),
"S_COLUMN_SPAN" => $s_column_span, 'S_COLUMN_SPAN' => $s_column_span,
"S_HIDDEN_FIELDS" => $s_hidden_fields) 'S_HIDDEN_FIELDS' => $s_hidden_fields)
); );
} }
include('page_header_admin.'.$phpEx); include('./page_header_admin.'.$phpEx);
$template->pparse("body"); $template->pparse('body');
include('page_footer_admin.'.$phpEx); include('./page_footer_admin.'.$phpEx);
?> ?>

View file

@ -32,9 +32,9 @@ if( !empty($setmodules) )
// //
// Load default header // Load default header
// //
$phpbb_root_path = "../"; $phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc'); require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx); require('./pagestart.' . $phpEx);
include($phpbb_root_path . 'includes/functions_admin.'.$phpEx); include($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
$forum_auth_ary = array( $forum_auth_ary = array(
@ -826,7 +826,7 @@ if( !empty($mode) )
if ($show_index != TRUE) if ($show_index != TRUE)
{ {
include('page_footer_admin.'.$phpEx); include('./page_footer_admin.'.$phpEx);
exit; exit;
} }
} }
@ -931,6 +931,6 @@ if( $total_categories = $db->sql_numrows($q_categories) )
$template->pparse("body"); $template->pparse("body");
include('page_footer_admin.'.$phpEx); include('./page_footer_admin.'.$phpEx);
?> ?>

View file

@ -22,7 +22,7 @@
define('IN_PHPBB', 1); define('IN_PHPBB', 1);
if( !empty($setmodules) ) if ( !empty($setmodules) )
{ {
$filename = basename(__FILE__); $filename = basename(__FILE__);
$module['Groups']['Manage'] = $filename; $module['Groups']['Manage'] = $filename;
@ -33,38 +33,35 @@ if( !empty($setmodules) )
// //
// Load default header // Load default header
// //
$phpbb_root_path = "../"; $phpbb_root_path = './../';
require($phpbb_root_path . 'extension.inc'); require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx); require('./pagestart.' . $phpEx);
if( isset($HTTP_POST_VARS[POST_GROUPS_URL]) || isset($HTTP_GET_VARS[POST_GROUPS_URL]) ) if ( isset($HTTP_POST_VARS[POST_GROUPS_URL]) || isset($HTTP_GET_VARS[POST_GROUPS_URL]) )
{ {
$group_id = ( isset($HTTP_POST_VARS[POST_GROUPS_URL]) ) ? intval($HTTP_POST_VARS[POST_GROUPS_URL]) : intval($HTTP_GET_VARS[POST_GROUPS_URL]); $group_id = ( isset($HTTP_POST_VARS[POST_GROUPS_URL]) ) ? intval($HTTP_POST_VARS[POST_GROUPS_URL]) : intval($HTTP_GET_VARS[POST_GROUPS_URL]);
} }
else else
{ {
$group_id = ""; $group_id = '';
} }
// if ( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) )
// Mode setting
//
if( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) )
{ {
$mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode']; $mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
} }
else else
{ {
$mode = ""; $mode = '';
} }
if( isset($HTTP_POST_VARS['edit']) || isset($HTTP_POST_VARS['new']) ) if ( isset($HTTP_POST_VARS['edit']) || isset($HTTP_POST_VARS['new']) )
{ {
// //
// Ok they are editing a group or creating a new group // Ok they are editing a group or creating a new group
// //
$template->set_filenames(array( $template->set_filenames(array(
"body" => "admin/group_edit_body.tpl") 'body' => 'admin/group_edit_body.tpl')
); );
if ( isset($HTTP_POST_VARS['edit']) ) if ( isset($HTTP_POST_VARS['edit']) )
@ -76,34 +73,33 @@ if( isset($HTTP_POST_VARS['edit']) || isset($HTTP_POST_VARS['new']) )
FROM " . GROUPS_TABLE . " FROM " . GROUPS_TABLE . "
WHERE group_single_user <> " . TRUE . " WHERE group_single_user <> " . TRUE . "
AND group_id = $group_id"; AND group_id = $group_id";
if(!$result = $db->sql_query($sql)) if ( !($result = $db->sql_query($sql)) )
{ {
message_die(GENERAL_ERROR, "Error getting group information", "", __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Error getting group information', '', __LINE__, __FILE__, $sql);
} }
if( !$db->sql_numrows($result) ) if ( !($group_info = $db->sql_fetchrow($result)) )
{ {
message_die(GENERAL_MESSAGE, $lang['Group_not_exist']); message_die(GENERAL_MESSAGE, $lang['Group_not_exist']);
} }
$group_info = $db->sql_fetchrow($result); $mode = 'editgroup';
$template->assign_block_vars('group_edit', array());
$mode = "editgroup";
$template->assign_block_vars("group_edit", array());
} }
else if( isset($HTTP_POST_VARS['new']) ) else if ( isset($HTTP_POST_VARS['new']) )
{ {
$group_info = array ( $group_info = array (
"group_name" => "", 'group_name' => '',
"group_description" => "", 'group_description' => '',
"group_moderator" => "", 'group_moderator' => '',
"group_type" => GROUP_OPEN); 'group_type' => GROUP_OPEN);
$group_open = "checked=\"checked\""; $group_open = ' checked="checked"';
$mode = "newgroup"; $mode = 'newgroup';
} }
// //
// Ok, now we know everything about them, let's show the page. // Ok, now we know everything about them, let's show the page.
// //
@ -111,111 +107,108 @@ if( isset($HTTP_POST_VARS['edit']) || isset($HTTP_POST_VARS['new']) )
FROM " . USERS_TABLE . " FROM " . USERS_TABLE . "
WHERE user_id <> " . ANONYMOUS . " WHERE user_id <> " . ANONYMOUS . "
ORDER BY username"; ORDER BY username";
$u_result = $db->sql_query($sql); if ( !($result = $db->sql_query($sql)) )
if( !$u_result )
{ {
message_die(GENERAL_ERROR, "Couldn't obtain user info for moderator list", "", __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Could not obtain user info for moderator list', '', __LINE__, __FILE__, $sql);
} }
$user_list = $db->sql_fetchrowset($u_result); while ( $row = $db->sql_fetchrow($result) )
for($i = 0; $i < count($user_list); $i++)
{ {
if( $user_list[$i]['user_id'] == $group_info['group_moderator'] ) if ( $row['user_id'] == $group_info['group_moderator'] )
{ {
$group_moderator = $user_list[$i]['username']; $group_moderator = $row['username'];
} }
} }
$group_open = ( $group_info['group_type'] == GROUP_OPEN ) ? "checked=\"checked\"" : ""; $group_open = ( $group_info['group_type'] == GROUP_OPEN ) ? ' checked="checked"' : '';
$group_closed = ( $group_info['group_type'] == GROUP_CLOSED ) ? "checked=\"checked\"" : ""; $group_closed = ( $group_info['group_type'] == GROUP_CLOSED ) ? ' checked="checked"' : '';
$group_hidden = ( $group_info['group_type'] == GROUP_HIDDEN ) ? "checked=\"checked\"" : ""; $group_hidden = ( $group_info['group_type'] == GROUP_HIDDEN ) ? ' checked="checked"' : '';
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="' . POST_GROUPS_URL . '" value="' . $group_id . '" />'; $s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="' . POST_GROUPS_URL . '" value="' . $group_id . '" />';
$template->assign_vars(array( $template->assign_vars(array(
"GROUP_NAME" => $group_info['group_name'], 'GROUP_NAME' => $group_info['group_name'],
"GROUP_DESCRIPTION" => $group_info['group_description'], 'GROUP_DESCRIPTION' => $group_info['group_description'],
"GROUP_MODERATOR" => $group_moderator, 'GROUP_MODERATOR' => $group_moderator,
"L_GROUP_TITLE" => $lang['Group_administration'], 'L_GROUP_TITLE' => $lang['Group_administration'],
"L_GROUP_EDIT_DELETE" => ( isset($HTTP_POST_VARS['new']) ) ? $lang['New_group'] : $lang['Edit_group'], 'L_GROUP_EDIT_DELETE' => ( isset($HTTP_POST_VARS['new']) ) ? $lang['New_group'] : $lang['Edit_group'],
"L_GROUP_NAME" => $lang['group_name'], 'L_GROUP_NAME' => $lang['group_name'],
"L_GROUP_DESCRIPTION" => $lang['group_description'], 'L_GROUP_DESCRIPTION' => $lang['group_description'],
"L_GROUP_MODERATOR" => $lang['group_moderator'], 'L_GROUP_MODERATOR' => $lang['group_moderator'],
"L_FIND_USERNAME" => $lang['Find_username'], 'L_FIND_USERNAME' => $lang['Find_username'],
"L_GROUP_STATUS" => $lang['group_status'], 'L_GROUP_STATUS' => $lang['group_status'],
"L_GROUP_OPEN" => $lang['group_open'], 'L_GROUP_OPEN' => $lang['group_open'],
"L_GROUP_CLOSED" => $lang['group_closed'], 'L_GROUP_CLOSED' => $lang['group_closed'],
"L_GROUP_HIDDEN" => $lang['group_hidden'], 'L_GROUP_HIDDEN' => $lang['group_hidden'],
"L_GROUP_DELETE" => $lang['group_delete'], 'L_GROUP_DELETE' => $lang['group_delete'],
"L_GROUP_DELETE_CHECK" => $lang['group_delete_check'], 'L_GROUP_DELETE_CHECK' => $lang['group_delete_check'],
"L_SUBMIT" => $lang['Submit'], 'L_SUBMIT' => $lang['Submit'],
"L_RESET" => $lang['Reset'], 'L_RESET' => $lang['Reset'],
"L_DELETE_MODERATOR" => $lang['delete_group_moderator'], 'L_DELETE_MODERATOR' => $lang['delete_group_moderator'],
"L_DELETE_MODERATOR_EXPLAIN" => $lang['delete_moderator_explain'], 'L_DELETE_MODERATOR_EXPLAIN' => $lang['delete_moderator_explain'],
"L_YES" => $lang['Yes'], 'L_YES' => $lang['Yes'],
"U_SEARCH_USER" => append_sid("../search.$phpEx?mode=searchuser"), 'U_SEARCH_USER' => append_sid("../search.$phpEx?mode=searchuser"),
"S_GROUP_OPEN_TYPE" => GROUP_OPEN, 'S_GROUP_OPEN_TYPE' => GROUP_OPEN,
"S_GROUP_CLOSED_TYPE" => GROUP_CLOSED, 'S_GROUP_CLOSED_TYPE' => GROUP_CLOSED,
"S_GROUP_HIDDEN_TYPE" => GROUP_HIDDEN, 'S_GROUP_HIDDEN_TYPE' => GROUP_HIDDEN,
"S_GROUP_OPEN_CHECKED" => $group_open, 'S_GROUP_OPEN_CHECKED' => $group_open,
"S_GROUP_CLOSED_CHECKED" => $group_closed, 'S_GROUP_CLOSED_CHECKED' => $group_closed,
"S_GROUP_HIDDEN_CHECKED" => $group_hidden, 'S_GROUP_HIDDEN_CHECKED' => $group_hidden,
"S_GROUP_ACTION" => append_sid("admin_groups.$phpEx"), 'S_GROUP_ACTION' => append_sid("admin_groups.$phpEx"),
"S_HIDDEN_FIELDS" => $s_hidden_fields) 'S_HIDDEN_FIELDS' => $s_hidden_fields)
); );
$template->pparse('body'); $template->pparse('body');
} }
else if( isset($HTTP_POST_VARS['group_update']) ) else if ( isset($HTTP_POST_VARS['group_update']) )
{ {
// //
// Ok, they are submitting a group, let's save the data based on if it's new or editing // Ok, they are submitting a group, let's save the data based on if it's new or editing
// //
if( isset($HTTP_POST_VARS['group_delete']) ) if ( isset($HTTP_POST_VARS['group_delete']) )
{ {
$sql = "DELETE FROM " . GROUPS_TABLE . " $sql = "DELETE FROM " . GROUPS_TABLE . "
WHERE group_id = " . $group_id; WHERE group_id = " . $group_id;
if ( !$result = $db->sql_query($sql) ) if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, "Couldn't update group", "", __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Could not update group', '', __LINE__, __FILE__, $sql);
} }
$sql = "DELETE FROM " . USER_GROUP_TABLE . " $sql = "DELETE FROM " . USER_GROUP_TABLE . "
WHERE group_id = " . $group_id; WHERE group_id = " . $group_id;
if ( !$result = $db->sql_query($sql) ) if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, "Couldn't update user_group", "", __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Could not update user_group', '', __LINE__, __FILE__, $sql);
} }
$sql = "DELETE FROM " . AUTH_ACCESS_TABLE . " $sql = "DELETE FROM " . AUTH_ACCESS_TABLE . "
WHERE group_id = " . $group_id; WHERE group_id = " . $group_id;
if ( !$result = $db->sql_query($sql) ) if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, "Couldn't update auth_access", "", __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Could not 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 = $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_die(GENERAL_MESSAGE, $message); message_die(GENERAL_MESSAGE, $message);
} }
else else
{ {
$group_type = isset($HTTP_POST_VARS['group_type']) ? intval($HTTP_POST_VARS['group_type']) : GROUP_OPEN; $group_type = isset($HTTP_POST_VARS['group_type']) ? intval($HTTP_POST_VARS['group_type']) : GROUP_OPEN;
$group_name = isset($HTTP_POST_VARS['group_name']) ? trim($HTTP_POST_VARS['group_name']) : ""; $group_name = isset($HTTP_POST_VARS['group_name']) ? trim($HTTP_POST_VARS['group_name']) : '';
$group_description = isset($HTTP_POST_VARS['group_description']) ? trim($HTTP_POST_VARS['group_description']) : ""; $group_description = isset($HTTP_POST_VARS['group_description']) ? trim($HTTP_POST_VARS['group_description']) : '';
$group_moderator = isset($HTTP_POST_VARS['username']) ? $HTTP_POST_VARS['username'] : ""; $group_moderator = isset($HTTP_POST_VARS['username']) ? $HTTP_POST_VARS['username'] : '';
$delete_old_moderator = isset($HTTP_POST_VARS['delete_old_moderator']) ? intval($HTTP_POST_VARS['delete_old_moderator']) : ""; $delete_old_moderator = isset($HTTP_POST_VARS['delete_old_moderator']) ? true : false;
if( $group_name == "" ) if ( $group_name == '' )
{ {
message_die(GENERAL_MESSAGE, $lang['No_group_name']); message_die(GENERAL_MESSAGE, $lang['No_group_name']);
} }
else if( $group_moderator == "" ) else if ( $group_moderator == '' )
{ {
message_die(GENERAL_MESSAGE, $lang['No_group_moderator']); message_die(GENERAL_MESSAGE, $lang['No_group_moderator']);
} }
@ -223,7 +216,7 @@ else if( isset($HTTP_POST_VARS['group_update']) )
$this_userdata = get_userdata($group_moderator); $this_userdata = get_userdata($group_moderator);
$group_moderator = $this_userdata['user_id']; $group_moderator = $this_userdata['user_id'];
if( !$group_moderator ) if ( !$group_moderator )
{ {
message_die(GENERAL_MESSAGE, $lang['No_group_moderator']); message_die(GENERAL_MESSAGE, $lang['No_group_moderator']);
} }
@ -234,54 +227,68 @@ else if( isset($HTTP_POST_VARS['group_update']) )
FROM " . GROUPS_TABLE . " FROM " . GROUPS_TABLE . "
WHERE group_single_user <> " . TRUE . " WHERE group_single_user <> " . TRUE . "
AND group_id = " . $group_id; AND group_id = " . $group_id;
if(!$result = $db->sql_query($sql)) if ( !($result = $db->sql_query($sql)) )
{ {
message_die(GENERAL_ERROR, "Error getting group information", "", __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Error getting group information', '', __LINE__, __FILE__, $sql);
} }
if( !$db->sql_numrows($result) )
if( !($group_info = $db->sql_fetchrow($result)) )
{ {
message_die(GENERAL_MESSAGE, $lang['Group_not_exist']); message_die(GENERAL_MESSAGE, $lang['Group_not_exist']);
} }
$group_info = $db->sql_fetchrow($result);
if ( $group_info['group_moderator'] != $group_moderator ) if ( $group_info['group_moderator'] != $group_moderator )
{ {
if ( $delete_old_moderator != "" ) if ( $delete_old_moderator )
{ {
$sql = "DELETE FROM " . USER_GROUP_TABLE . " $sql = "DELETE FROM " . USER_GROUP_TABLE . "
WHERE user_id = " . $group_info['group_moderator'] . " WHERE user_id = " . $group_info['group_moderator'] . "
AND group_id = " . $group_id; AND group_id = " . $group_id;
if ( !$result = $db->sql_query($sql) ) if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, "Couldn't update group moderator", "", __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Could not update group moderator', '', __LINE__, __FILE__, $sql);
} }
} }
$sql = "INSERT INTO " . USER_GROUP_TABLE . " (group_id, user_id, user_pending)
VALUES (" . $group_id . ", " . $group_moderator . ", 0)"; $sql = "SELECT user_id
if ( !$result = $db->sql_query($sql) ) FROM " . USER_GROUP_TABLE . "
WHERE user_id = $group_moderator
AND group_id = $group_id";
if ( !($result = $db->sql_query($sql)) )
{ {
message_die(GENERAL_ERROR, "Couldn't update group moderator", "", __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Failed to obtain current group moderator info', '', __LINE__, __FILE__, $sql);
}
if ( !($row = $db->sql_fetchrow($result)) )
{
$sql = "INSERT INTO " . USER_GROUP_TABLE . " (group_id, user_id, user_pending)
VALUES (" . $group_id . ", " . $group_moderator . ", 0)";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update group moderator', '', __LINE__, __FILE__, $sql);
}
} }
} }
$sql = "UPDATE " . GROUPS_TABLE . " $sql = "UPDATE " . GROUPS_TABLE . "
SET group_type = $group_type, group_name = '" . str_replace("\'", "''", $group_name) . "', group_description = '" . str_replace("\'", "''", $group_description) . "', group_moderator = $group_moderator SET group_type = $group_type, group_name = '" . str_replace("\'", "''", $group_name) . "', group_description = '" . str_replace("\'", "''", $group_description) . "', group_moderator = $group_moderator
WHERE group_id = $group_id"; WHERE group_id = $group_id";
if ( !$result = $db->sql_query($sql) ) if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, "Couldn't update group", "", __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Could not 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 = $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_die(GENERAL_MESSAGE, $message); message_die(GENERAL_MESSAGE, $message);
} }
else if( $mode == "newgroup" ) else if( $mode == 'newgroup' )
{ {
$sql = "SELECT MAX(group_id) AS new_group_id $sql = "SELECT MAX(group_id) AS new_group_id
FROM " . GROUPS_TABLE; FROM " . GROUPS_TABLE;
if ( !$result = $db->sql_query($sql) ) if ( !($result = $db->sql_query($sql)) )
{ {
message_die(GENERAL_ERROR, "Couldn't insert new group", "", __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Could not insert new group', '', __LINE__, __FILE__, $sql);
} }
$row = $db->sql_fetchrow($result); $row = $db->sql_fetchrow($result);
@ -289,26 +296,26 @@ else if( isset($HTTP_POST_VARS['group_update']) )
$sql = "INSERT INTO " . GROUPS_TABLE . " (group_id, group_type, group_name, group_description, group_moderator, group_single_user) $sql = "INSERT INTO " . GROUPS_TABLE . " (group_id, group_type, group_name, group_description, group_moderator, group_single_user)
VALUES ($new_group_id, $group_type, '" . str_replace("\'", "''", $group_name) . "', '" . str_replace("\'", "''", $group_description) . "', $group_moderator, '0')"; VALUES ($new_group_id, $group_type, '" . str_replace("\'", "''", $group_name) . "', '" . str_replace("\'", "''", $group_description) . "', $group_moderator, '0')";
if ( !$result = $db->sql_query($sql) ) if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, "Couldn't insert new group", "", __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Could not insert new group', '', __LINE__, __FILE__, $sql);
} }
$sql = "INSERT INTO " . USER_GROUP_TABLE . " (group_id, user_id, user_pending) $sql = "INSERT INTO " . USER_GROUP_TABLE . " (group_id, user_id, user_pending)
VALUES ($new_group_id, $group_moderator, 0)"; VALUES ($new_group_id, $group_moderator, 0)";
if ( !$result = $db->sql_query($sql) ) if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, "Couldn't insert new user-group info", "", __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Could not 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 = $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_die(GENERAL_MESSAGE, $message); message_die(GENERAL_MESSAGE, $message);
} }
else else
{ {
message_die(GENERAL_MESSAGE, $lang['Group_mode_not_selected']); message_die(GENERAL_MESSAGE, $lang['No_group_action']);
} }
} }
} }
@ -318,42 +325,46 @@ else
FROM " . GROUPS_TABLE . " FROM " . GROUPS_TABLE . "
WHERE group_single_user <> " . TRUE . " WHERE group_single_user <> " . TRUE . "
ORDER BY group_name"; ORDER BY group_name";
$g_result = $db->sql_query($sql); if ( !($result = $db->sql_query($sql)) )
$group_list = $db->sql_fetchrowset($g_result);
$select_list = "<select name=\"" . POST_GROUPS_URL . "\">";
for($i = 0; $i < count($group_list); $i++)
{ {
$select_list .= "<option value=\"" . $group_list[$i]['group_id'] . "\">" . $group_list[$i]['group_name'] . "</option>"; message_die(GENERAL_ERROR, 'Could not obtain group list', '', __LINE__, __FILE__, $sql);
}
$select_list = '';
if ( $row = $db->sql_fetchrow($result) )
{
$select_list .= '<select name="' . POST_GROUPS_URL . '">';
do
{
$select_list .= '<option value="' . $row['group_id'] . '">' . $row['group_name'] . '</option>';
}
while ( $row = $db->sql_fetchrow($result) );
$select_list .= '</select>';
} }
$select_list .= "</select>";
$template->set_filenames(array( $template->set_filenames(array(
"body" => "admin/group_select_body.tpl") 'body' => 'admin/group_select_body.tpl')
); );
$template->assign_vars(array( $template->assign_vars(array(
"L_GROUP_TITLE" => $lang['Group_administration'], 'L_GROUP_TITLE' => $lang['Group_administration'],
"L_GROUP_EXPLAIN" => $lang['Group_admin_explain'], 'L_GROUP_EXPLAIN' => $lang['Group_admin_explain'],
"L_GROUP_SELECT" => $lang['Select_group'], 'L_GROUP_SELECT' => $lang['Select_group'],
"L_LOOK_UP" => $lang['Look_up_group'], 'L_LOOK_UP' => $lang['Look_up_group'],
"L_CREATE_NEW_GROUP" => $lang['New_group'], 'L_CREATE_NEW_GROUP' => $lang['New_group'],
"S_GROUP_ACTION" => append_sid("admin_groups.$phpEx"), 'S_GROUP_ACTION' => append_sid("admin_groups.$phpEx"),
"S_GROUP_SELECT" => $select_list) 'S_GROUP_SELECT' => $select_list)
); );
// if ( $select_list != '' )
// Faking the IF... ELSE statements again...
//
if( count($group_list) > 0 )
{ {
$template->assign_block_vars("select_box", array()); $template->assign_block_vars('select_box', array());
} }
$template->pparse('body'); $template->pparse('body');
} }
include('page_footer_admin.'.$phpEx); include('./page_footer_admin.'.$phpEx);
?> ?>

View file

@ -33,9 +33,9 @@ if( !empty($setmodules) )
// Load default header // Load default header
// //
$no_page_header = TRUE; $no_page_header = TRUE;
$phpbb_root_path = "../"; $phpbb_root_path = './../';
require($phpbb_root_path . 'extension.inc'); require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx); require('./pagestart.' . $phpEx);
// //
// Increase maximum execution time in case of a lot of users, but don't complain about it if it isn't // Increase maximum execution time in case of a lot of users, but don't complain about it if it isn't
@ -43,108 +43,114 @@ require('pagestart.' . $phpEx);
// //
@set_time_limit(1200); @set_time_limit(1200);
$message = ""; $message = '';
$subject = ""; $subject = '';
// //
// Do the job ... // Do the job ...
// //
if( isset($HTTP_POST_VARS['submit']) ) if ( isset($HTTP_POST_VARS['submit']) )
{ {
$subject = stripslashes(trim($HTTP_POST_VARS['subject']));
$message = stripslashes(trim($HTTP_POST_VARS['message']));
$error = FALSE;
$error_msg = '';
if ( empty($subject) )
{
$error = true;
$error_msg .= ( !empty($error_msg) ) ? '<br />' . $lang['Empty_subject'] : $lang['Empty_subject'];
}
if ( empty($message) )
{
$error = true;
$error_msg .= ( !empty($error_msg) ) ? '<br />' . $lang['Empty_message'] : $lang['Empty_message'];
}
$group_id = intval($HTTP_POST_VARS[POST_GROUPS_URL]); $group_id = intval($HTTP_POST_VARS[POST_GROUPS_URL]);
if( $group_id != -1 ) $sql = ( $group_id != -1 ) ? "SELECT u.user_email FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug WHERE ug.group_id = $group_id AND ug.user_pending <> " . TRUE . " AND u.user_id = ug.user_id" : "SELECT user_email FROM " . USERS_TABLE;
if ( !($result = $db->sql_query($sql)) )
{ {
$sql = "SELECT u.user_email message_die(GENERAL_ERROR, 'Could not select group members', '', __LINE__, __FILE__, $sql);
FROM " . USERS_TABLE . " u, " . USER_GROUP_TABLE . " ug }
WHERE ug.group_id = $group_id
AND ug.user_pending <> " . TRUE . " if ( $row = $db->sql_fetchrow($result) )
AND u.user_id = ug.user_id"; {
$bcc_list = '';
do
{
$bcc_list .= ( ( $bcc_list != '' ) ? ', ' : '' ) . $row['user_email'];
}
while ( $row = $db->sql_fetchrow($result) );
$db->sql_freeresult($result);
} }
else else
{ {
$sql = "SELECT user_email $message = ( $group_id != -1 ) ? $lang['Group_not_exist'] : $lang['No_such_user'];
FROM " . USERS_TABLE;
$error = true;
$error_msg .= ( !empty($error_msg) ) ? '<br />' . $message : $message;
} }
if( !$result = $db->sql_query($sql) ) if ( !$error )
{
message_die(GENERAL_ERROR, "Coult not select group members!", __LINE__, __FILE__, $sql);
}
if( !$db->sql_numrows($result) )
{
//
// Output a relevant GENERAL_MESSAGE about users/group
// not existing
//
}
$email_list = $db->sql_fetchrowset($g_result);
$subject = stripslashes($HTTP_POST_VARS["subject"]);
$message = stripslashes($HTTP_POST_VARS["message"]);
//
// Error checking needs to go here ... if no subject and/or
// no message then skip over the send and return to the form
//
$error = FALSE;
if( !$error )
{ {
include($phpbb_root_path . 'includes/emailer.'.$phpEx); include($phpbb_root_path . 'includes/emailer.'.$phpEx);
// //
// Let's do some checking to make sure that mass mail functions // Let's do some checking to make sure that mass mail functions
// are working in win32 versions of php. // are working in win32 versions of php.
// //
if( preg_match('/[c-z]:\\\.*/i', getenv('PATH')) && !$board_config['smtp_delivery']) if ( preg_match('/[c-z]:\\\.*/i', getenv('PATH')) && !$board_config['smtp_delivery'])
{ {
// We are running on windows, force delivery to use $ini_val = ( @phpversion() >= '4.0.0' ) ? 'ini_get' : 'get_cfg_var';
// our smtp functions since php's are broken by default
// We are running on windows, force delivery to use our smtp functions
// since php's are broken by default
$board_config['smtp_delivery'] = 1; $board_config['smtp_delivery'] = 1;
$board_config['smtp_host'] = get_cfg_var('SMTP'); $board_config['smtp_host'] = @$ini_val('SMTP');
} }
$emailer = new emailer($board_config['smtp_delivery']); $emailer = new emailer($board_config['smtp_delivery']);
$email_headers = "From: " . $board_config['board_email'] . "\n"; $email_headers = 'Return-Path: ' . $userdata['board_email'] . "\nFrom: " . $board_config['board_email'] . "\n";
$email_headers .= 'X-AntiAbuse: Board servername - ' . $board_config['server_name'] . "\n";
$bcc_list = ""; $email_headers .= 'X-AntiAbuse: User_id - ' . $userdata['user_id'] . "\n";
for($i = 0; $i < count($email_list); $i++) $email_headers .= 'X-AntiAbuse: Username - ' . $userdata['username'] . "\n";
{ $email_headers .= 'X-AntiAbuse: User IP - ' . decode_ip($user_ip) . "\n";
if( $bcc_list != "" )
{
$bcc_list .= ", ";
}
$bcc_list .= $email_list[$i]['user_email'];
}
$email_headers .= "Bcc: $bcc_list\n"; $email_headers .= "Bcc: $bcc_list\n";
$email_headers .= "Return-Path: " . $userdata['board_email'] . "\n";
$email_headers .= "X-AntiAbuse: Board servername - " . $server_name . "\n";
$email_headers .= "X-AntiAbuse: User_id - " . $userdata['user_id'] . "\n";
$email_headers .= "X-AntiAbuse: Username - " . $userdata['username'] . "\n";
$email_headers .= "X-AntiAbuse: User IP - " . decode_ip($user_ip) . "\r\n";
$emailer->use_template("admin_send_email"); $emailer->use_template('admin_send_email');
$emailer->email_address($board_config['board_email']); $emailer->email_address($board_config['board_email']);
$emailer->set_subject($subject); $emailer->set_subject($subject);
$emailer->extra_headers($email_headers); $emailer->extra_headers($email_headers);
$emailer->assign_vars(array( $emailer->assign_vars(array(
"SITENAME" => $board_config['sitename'], 'SITENAME' => $board_config['sitename'],
"BOARD_EMAIL" => $board_config['board_email'], 'BOARD_EMAIL' => $board_config['board_email'],
"MESSAGE" => $message) 'MESSAGE' => $message)
); );
$emailer->send(); $emailer->send();
$emailer->reset(); $emailer->reset();
$message = $lang['Email_sent'] . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); message_die(GENERAL_MESSAGE, $lang['Email_sent'] . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid("index.$phpEx?pane=right") . '">', '</a>'));
message_die(GENERAL_MESSAGE, $message);
} }
} }
if ( $error )
{
$template->set_filenames(array(
'reg_header' => 'error_body.tpl')
);
$template->assign_vars(array(
'ERROR_MESSAGE' => $error_msg)
);
$template->assign_var_from_handle('ERROR_BOX', 'reg_header');
}
// //
// Initial selection // Initial selection
// //
@ -152,47 +158,50 @@ if( isset($HTTP_POST_VARS['submit']) )
$sql = "SELECT group_id, group_name $sql = "SELECT group_id, group_name
FROM ".GROUPS_TABLE . " FROM ".GROUPS_TABLE . "
WHERE group_single_user <> 1"; WHERE group_single_user <> 1";
$g_result = $db->sql_query($sql); if ( !($result = $db->sql_query($sql)) )
$group_list = $db->sql_fetchrowset($g_result);
$select_list = '<select name = "' . POST_GROUPS_URL . '">';
$select_list .= '<option value = "-1">' . $lang['All_users'] . '</option>';
for($i = 0;$i < count($group_list); $i++)
{ {
$select_list .= "<option value = \"" . $group_list[$i]['group_id']; message_die(GENERAL_ERROR, 'Could not obtain list of groups', '', __LINE__, __FILE__, $sql);
$select_list .= "\">" . $group_list[$i]['group_name'] . "</option>";
} }
$select_list .= "</select>";
$select_list = '<select name = "' . POST_GROUPS_URL . '"><option value = "-1">' . $lang['All_users'] . '</option>';
if ( $row = $db->sql_fetchrow($result) )
{
do
{
$select_list .= '<option value = "' . $row['group_id'] . '">' . $row['group_name'] . '</option>';
}
while ( $row = $db->sql_fetchrow($result) );
}
$select_list .= '</select>';
// //
// Generate page // Generate page
// //
include('page_header_admin.'.$phpEx); include('./page_header_admin.'.$phpEx);
$template->set_filenames(array( $template->set_filenames(array(
"body" => "admin/user_email_body.tpl") 'body' => 'admin/user_email_body.tpl')
); );
$template->assign_vars(array( $template->assign_vars(array(
"MESSAGE" => $message, 'MESSAGE' => $message,
"SUBJECT" => $subject, 'SUBJECT' => $subject,
"L_EMAIL_TITLE" => $lang['Email'], 'L_EMAIL_TITLE' => $lang['Email'],
"L_EMAIL_EXPLAIN" => $lang['Mass_email_explain'], 'L_EMAIL_EXPLAIN' => $lang['Mass_email_explain'],
"L_COMPOSE" => $lang['Compose'], 'L_COMPOSE' => $lang['Compose'],
"L_RECIPIENTS" => $lang['Recipients'], 'L_RECIPIENTS' => $lang['Recipients'],
"L_EMAIL_SUBJECT" => $lang['Subject'], 'L_EMAIL_SUBJECT' => $lang['Subject'],
"L_EMAIL_MSG" => $lang['Message'], 'L_EMAIL_MSG' => $lang['Message'],
"L_EMAIL" => $lang['Email'], 'L_EMAIL' => $lang['Email'],
"L_NOTICE" => $notice, 'L_NOTICE' => $notice,
"S_USER_ACTION" => append_sid('admin_mass_email.'.$phpEx), 'S_USER_ACTION' => append_sid('admin_mass_email.'.$phpEx),
"S_GROUP_SELECT" => $select_list) 'S_GROUP_SELECT' => $select_list)
); );
$template->pparse('body'); $template->pparse('body');
include('page_footer_admin.'.$phpEx); include('./page_footer_admin.'.$phpEx);
?> ?>

View file

@ -32,9 +32,9 @@ if( !empty($setmodules) )
// //
// Let's set the root dir for phpBB // Let's set the root dir for phpBB
// //
$phpbb_root_path = "../"; $phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc'); require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx); require('./pagestart.' . $phpEx);
if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{ {
@ -255,7 +255,7 @@ if( $mode != "" )
$template->assign_vars(array( $template->assign_vars(array(
"L_RANKS_TITLE" => $lang['Ranks_title'], "L_RANKS_TITLE" => $lang['Ranks_title'],
"L_RANKS_TEXT" => $lang['Ranks_explain'], "L_RANKS_TEXT" => $lang['Ranks_explain'],
"L_RANK" => $lang['Rank'], "L_RANK" => $lang['Rank_title'],
"L_RANK_MINIMUM" => $lang['Rank_minimum'], "L_RANK_MINIMUM" => $lang['Rank_minimum'],
"L_SPECIAL_RANK" => $lang['Special_rank'], "L_SPECIAL_RANK" => $lang['Special_rank'],
"L_EDIT" => $lang['Edit'], "L_EDIT" => $lang['Edit'],
@ -360,6 +360,6 @@ else
$template->pparse("body"); $template->pparse("body");
include('page_footer_admin.'.$phpEx); include('./page_footer_admin.'.$phpEx);
?> ?>

View file

@ -47,9 +47,9 @@ if( isset($HTTP_GET_VARS['export_pack']) )
} }
} }
$phpbb_root_path = "../"; $phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc'); require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx); require('./pagestart.' . $phpEx);
// //
// Check to see what mode we should operate in. // Check to see what mode we should operate in.
@ -286,7 +286,7 @@ else if( isset($HTTP_POST_VARS['add']) )
$template->assign_vars(array( $template->assign_vars(array(
"L_SMILEY_TITLE" => $lang['smiley_title'], "L_SMILEY_TITLE" => $lang['smiley_title'],
"L_SMILEY_CONFIG" => $lang['smiley_config'], "L_SMILEY_CONFIG" => $lang['smiley_config'],
"L_SMILEY_EXPLAIN" => $lang['smiley_instr'], "L_SMILEY_EXPLAIN" => $lang['smile_desc'],
"L_SMILEY_CODE" => $lang['smiley_code'], "L_SMILEY_CODE" => $lang['smiley_code'],
"L_SMILEY_URL" => $lang['smiley_url'], "L_SMILEY_URL" => $lang['smiley_url'],
"L_SMILEY_EMOTION" => $lang['smiley_emot'], "L_SMILEY_EMOTION" => $lang['smiley_emot'],
@ -340,7 +340,7 @@ else if ( $mode != "" )
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
if( !$result ) if( !$result )
{ {
message_die(GENERAL_ERROR, $lang['smile_edit_err'], "", __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Could not obtain emoticon information', "", __LINE__, __FILE__, $sql);
} }
$smile_data = $db->sql_fetchrow($result); $smile_data = $db->sql_fetchrow($result);
@ -536,6 +536,6 @@ else
// //
// Page Footer // Page Footer
// //
include('page_footer_admin.'.$phpEx); include('./page_footer_admin.'.$phpEx);
?> ?>

View file

@ -38,7 +38,7 @@ if( !empty($setmodules) )
// //
// Check if the user has cancled a confirmation message. // Check if the user has cancled a confirmation message.
// //
$phpbb_root_path = "../"; $phpbb_root_path = "./../";
$confirm = ( isset($HTTP_POST_VARS['confirm']) ) ? TRUE : FALSE; $confirm = ( isset($HTTP_POST_VARS['confirm']) ) ? TRUE : FALSE;
$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : FALSE; $cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : FALSE;
@ -47,12 +47,14 @@ if( empty($HTTP_POST_VARS['send_file']) )
{ {
$no_page_header = ( $cancel ) ? TRUE : FALSE; $no_page_header = ( $cancel ) ? TRUE : FALSE;
require($phpbb_root_path . 'extension.inc'); require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx); require('./pagestart.' . $phpEx);
} }
if( $cancel ) if( $cancel )
{ {
header("Location: " . append_sid("admin_styles.$phpEx")); $header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
header($header_location . append_sid("admin_styles.$phpEx"));
exit;
} }
if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
@ -561,6 +563,7 @@ switch( $mode )
} }
} }
} }
$s_template_select .= '</select>';
} }
else else
{ {
@ -931,7 +934,7 @@ switch( $mode )
if( !$HTTP_POST_VARS['send_file'] ) if( !$HTTP_POST_VARS['send_file'] )
{ {
include('page_footer_admin.'.$phpEx); include('./page_footer_admin.'.$phpEx);
} }
?> ?>

View file

@ -36,9 +36,9 @@ if( !empty($setmodules) )
// //
$no_page_header = TRUE; $no_page_header = TRUE;
$phpbb_root_path = "../"; $phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc'); require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx); require('./pagestart.' . $phpEx);
$params = array('mode' => 'mode', 'user_id' => POST_USERS_URL, 'group_id' => POST_GROUPS_URL, 'adv' => 'adv'); $params = array('mode' => 'mode', 'user_id' => POST_USERS_URL, 'group_id' => POST_GROUPS_URL, 'adv' => 'adv');
@ -787,7 +787,9 @@ else if ( ( $mode == 'user' && ( isset($HTTP_POST_VARS['username']) || $user_id
$t_usergroup_list = ''; $t_usergroup_list = '';
for($i = 0; $i < count($ug_info); $i++) for($i = 0; $i < count($ug_info); $i++)
{ {
$t_usergroup_list .= ( ( $t_usergroup_list != '' ) ? ', ' : '' ) . '<a href="' . append_sid("admin_ug_auth.$phpEx?mode=$mode&amp;" . POST_GROUPS_URL . "=" . $id[$i]) . '">' . $name[$i] . '</a>'; $ug = ( $mode == 'user' ) ? 'group&amp;' . POST_GROUPS_URL : 'user&amp;' . POST_USERS_URL;
$t_usergroup_list .= ( ( $t_usergroup_list != '' ) ? ', ' : '' ) . '<a href="' . append_sid("admin_ug_auth.$phpEx?mode=$ug=" . $id[$i]) . '">' . $name[$i] . '</a>';
} }
} }
else else
@ -819,7 +821,7 @@ else if ( ( $mode == 'user' && ( isset($HTTP_POST_VARS['username']) || $user_id
// //
// Dump in the page header ... // Dump in the page header ...
// //
include('page_header_admin.'.$phpEx); include('./page_header_admin.'.$phpEx);
$template->set_filenames(array( $template->set_filenames(array(
"body" => 'admin/auth_ug_body.tpl') "body" => 'admin/auth_ug_body.tpl')
@ -856,14 +858,14 @@ else if ( ( $mode == 'user' && ( isset($HTTP_POST_VARS['username']) || $user_id
$template->assign_vars(array( $template->assign_vars(array(
'L_USER_OR_GROUPNAME' => ( $mode == 'user' ) ? $lang['Username'] : $lang['Group_name'], 'L_USER_OR_GROUPNAME' => ( $mode == 'user' ) ? $lang['Username'] : $lang['Group_name'],
'L_USER_OR_GROUP' => ( $mode == 'user' ) ? $lang['User'] : $lang['Group'],
'L_AUTH_TITLE' => ( $mode == 'user' ) ? $lang['Auth_Control_User'] : $lang['Auth_Control_Group'], 'L_AUTH_TITLE' => ( $mode == 'user' ) ? $lang['Auth_Control_User'] : $lang['Auth_Control_Group'],
'L_AUTH_EXPLAIN' => ( $mode == 'user' ) ? $lang['User_auth_explain'] : $lang['Group_auth_explain'], 'L_AUTH_EXPLAIN' => ( $mode == 'user' ) ? $lang['User_auth_explain'] : $lang['Group_auth_explain'],
'L_MODERATOR_STATUS' => $lang['Moderator_status'], 'L_MODERATOR_STATUS' => $lang['Moderator_status'],
'L_PERMISSIONS' => $lang['Permissions'], 'L_PERMISSIONS' => $lang['Permissions'],
'L_SUBMIT' => $lang['Submit'], 'L_SUBMIT' => $lang['Submit'],
'L_RESET' => $lang['Reset'], 'L_RESET' => $lang['Reset'],
'L_FORUM' => $lang['Forum'],
'U_USER_OR_GROUP' => append_sid("admin_ug_auth.$phpEx"), 'U_USER_OR_GROUP' => append_sid("admin_ug_auth.$phpEx"),
'U_SWITCH_MODE' => $u_switch_mode, 'U_SWITCH_MODE' => $u_switch_mode,
@ -878,7 +880,7 @@ else
// //
// Select a user/group // Select a user/group
// //
include('page_header_admin.'.$phpEx); include('./page_header_admin.'.$phpEx);
$template->set_filenames(array( $template->set_filenames(array(
'body' => ( $mode == 'user' ) ? 'admin/user_select_body.tpl' : 'admin/auth_select_body.tpl') 'body' => ( $mode == 'user' ) ? 'admin/user_select_body.tpl' : 'admin/auth_select_body.tpl')
@ -920,7 +922,7 @@ else
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" />'; $s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" />';
$l_type = ( $mode == 'user' ) ? "USER" : "AUTH"; $l_type = ( $mode == 'user' ) ? 'USER' : 'AUTH';
$template->assign_vars(array( $template->assign_vars(array(
'L_' . $l_type . '_TITLE' => ( $mode == 'user' ) ? $lang['Auth_Control_User'] : $lang['Auth_Control_Group'], 'L_' . $l_type . '_TITLE' => ( $mode == 'user' ) ? $lang['Auth_Control_User'] : $lang['Auth_Control_Group'],
@ -936,6 +938,6 @@ else
$template->pparse('body'); $template->pparse('body');
include('page_footer_admin.'.$phpEx); include('./page_footer_admin.'.$phpEx);
?> ?>

View file

@ -22,7 +22,7 @@
define('IN_PHPBB', 1); define('IN_PHPBB', 1);
if( !empty($setmodules) ) if ( !empty($setmodules) )
{ {
$filename = basename(__FILE__); $filename = basename(__FILE__);
$module['Users']['Ban_Management'] = $filename; $module['Users']['Ban_Management'] = $filename;
@ -33,38 +33,39 @@ if( !empty($setmodules) )
// //
// Load default header // Load default header
// //
$phpbb_root_path = "../"; $phpbb_root_path = './../';
require($phpbb_root_path . 'extension.inc'); require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx); require('./pagestart.' . $phpEx);
// //
// Start program // Start program
// //
if( isset($HTTP_POST_VARS['submit']) ) if ( isset($HTTP_POST_VARS['submit']) )
{ {
$user_bansql = ""; $user_bansql = '';
$email_bansql = ""; $email_bansql = '';
$ip_bansql = ""; $ip_bansql = '';
$user_list = array(); $user_list = array();
if( isset($HTTP_POST_VARS['ban_user']) ) if ( !empty($HTTP_POST_VARS['username']) )
{ {
$user_list_temp = $HTTP_POST_VARS['ban_user']; $this_userdata = get_userdata($HTTP_POST_VARS['username']);
if( !$this_userdata )
for($i = 0; $i < count($user_list_temp); $i++)
{ {
$user_list[] = trim($user_list_temp[$i]); message_die(GENERAL_MESSAGE, $lang['No_user_id_specified'] );
} }
$user_list[] = $this_userdata['user_id'];
} }
$ip_list = array(); $ip_list = array();
if( isset($HTTP_POST_VARS['ban_ip']) ) if ( isset($HTTP_POST_VARS['ban_ip']) )
{ {
$ip_list_temp = explode(",", $HTTP_POST_VARS['ban_ip']); $ip_list_temp = explode(',', $HTTP_POST_VARS['ban_ip']);
for($i = 0; $i < count($ip_list_temp); $i++) for($i = 0; $i < count($ip_list_temp); $i++)
{ {
if( preg_match("/^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})[ ]*\-[ ]*([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/", trim($ip_list_temp[$i]), $ip_range_explode) ) if ( preg_match('/^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})[ ]*\-[ ]*([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/', trim($ip_list_temp[$i]), $ip_range_explode) )
{ {
// //
// Don't ask about all this, just don't ask ... ! // Don't ask about all this, just don't ask ... !
@ -72,12 +73,12 @@ if( isset($HTTP_POST_VARS['submit']) )
$ip_1_counter = $ip_range_explode[1]; $ip_1_counter = $ip_range_explode[1];
$ip_1_end = $ip_range_explode[5]; $ip_1_end = $ip_range_explode[5];
while($ip_1_counter <= $ip_1_end) while ( $ip_1_counter <= $ip_1_end )
{ {
$ip_2_counter = ($ip_1_counter == $ip_range_explode[1]) ? $ip_range_explode[2] : 0; $ip_2_counter = ( $ip_1_counter == $ip_range_explode[1] ) ? $ip_range_explode[2] : 0;
$ip_2_end = ($ip_1_counter < $ip_1_end) ? 254 : $ip_range_explode[6]; $ip_2_end = ( $ip_1_counter < $ip_1_end ) ? 254 : $ip_range_explode[6];
if($ip_2_counter == 0 && $ip_2_end == 254) if ( $ip_2_counter == 0 && $ip_2_end == 254 )
{ {
$ip_2_counter = 255; $ip_2_counter = 255;
$ip_2_fragment = 255; $ip_2_fragment = 255;
@ -85,12 +86,12 @@ if( isset($HTTP_POST_VARS['submit']) )
$ip_list[] = encode_ip("$ip_1_counter.255.255.255"); $ip_list[] = encode_ip("$ip_1_counter.255.255.255");
} }
while($ip_2_counter <= $ip_2_end) while ( $ip_2_counter <= $ip_2_end )
{ {
$ip_3_counter = ($ip_2_counter == $ip_range_explode[2] && $ip_1_counter == $ip_range_explode[1]) ? $ip_range_explode[3] : 0; $ip_3_counter = ( $ip_2_counter == $ip_range_explode[2] && $ip_1_counter == $ip_range_explode[1] ) ? $ip_range_explode[3] : 0;
$ip_3_end = ($ip_2_counter < $ip_2_end || $ip_1_counter < $ip_1_end) ? 254 : $ip_range_explode[7]; $ip_3_end = ( $ip_2_counter < $ip_2_end || $ip_1_counter < $ip_1_end ) ? 254 : $ip_range_explode[7];
if($ip_3_counter == 0 && $ip_3_end == 254 ) if ( $ip_3_counter == 0 && $ip_3_end == 254 )
{ {
$ip_3_counter = 255; $ip_3_counter = 255;
$ip_3_fragment = 255; $ip_3_fragment = 255;
@ -98,12 +99,12 @@ if( isset($HTTP_POST_VARS['submit']) )
$ip_list[] = encode_ip("$ip_1_counter.$ip_2_counter.255.255"); $ip_list[] = encode_ip("$ip_1_counter.$ip_2_counter.255.255");
} }
while($ip_3_counter <= $ip_3_end) while ( $ip_3_counter <= $ip_3_end )
{ {
$ip_4_counter = ($ip_3_counter == $ip_range_explode[3] && $ip_2_counter == $ip_range_explode[2] && $ip_1_counter == $ip_range_explode[1]) ? $ip_range_explode[4] : 0; $ip_4_counter = ( $ip_3_counter == $ip_range_explode[3] && $ip_2_counter == $ip_range_explode[2] && $ip_1_counter == $ip_range_explode[1] ) ? $ip_range_explode[4] : 0;
$ip_4_end = ($ip_3_counter < $ip_3_end || $ip_2_counter < $ip_2_end) ? 254 : $ip_range_explode[8]; $ip_4_end = ( $ip_3_counter < $ip_3_end || $ip_2_counter < $ip_2_end ) ? 254 : $ip_range_explode[8];
if($ip_4_counter == 0 && $ip_4_end == 254) if ( $ip_4_counter == 0 && $ip_4_end == 254 )
{ {
$ip_4_counter = 255; $ip_4_counter = 255;
$ip_4_fragment = 255; $ip_4_fragment = 255;
@ -111,7 +112,7 @@ if( isset($HTTP_POST_VARS['submit']) )
$ip_list[] = encode_ip("$ip_1_counter.$ip_2_counter.$ip_3_counter.255"); $ip_list[] = encode_ip("$ip_1_counter.$ip_2_counter.$ip_3_counter.255");
} }
while($ip_4_counter <= $ip_4_end) while ( $ip_4_counter <= $ip_4_end )
{ {
$ip_list[] = encode_ip("$ip_1_counter.$ip_2_counter.$ip_3_counter.$ip_4_counter"); $ip_list[] = encode_ip("$ip_1_counter.$ip_2_counter.$ip_3_counter.$ip_4_counter");
$ip_4_counter++; $ip_4_counter++;
@ -123,29 +124,29 @@ if( isset($HTTP_POST_VARS['submit']) )
$ip_1_counter++; $ip_1_counter++;
} }
} }
else if( preg_match("/^([\w\-_]\.?){2,}$/is", trim($ip_list_temp[$i])) ) else if ( preg_match('/^([\w\-_]\.?){2,}$/is', trim($ip_list_temp[$i])) )
{ {
$ip = gethostbynamel(trim($ip_list_temp[$i])); $ip = gethostbynamel(trim($ip_list_temp[$i]));
for($j = 0; $j < count($ip); $j++) for($j = 0; $j < count($ip); $j++)
{ {
if( !empty($ip[$j]) ) if ( !empty($ip[$j]) )
{ {
$ip_list[] = encode_ip($ip[$j]); $ip_list[] = encode_ip($ip[$j]);
} }
} }
} }
else if( preg_match("/^([0-9]{1,3})\.([0-9\*]{1,3})\.([0-9\*]{1,3})\.([0-9\*]{1,3})$/", trim($ip_list_temp[$i])) ) else if ( preg_match('/^([0-9]{1,3})\.([0-9\*]{1,3})\.([0-9\*]{1,3})\.([0-9\*]{1,3})$/', trim($ip_list_temp[$i])) )
{ {
$ip_list[] = encode_ip(str_replace("*", "255", trim($ip_list_temp[$i]))); $ip_list[] = encode_ip(str_replace('*', '255', trim($ip_list_temp[$i])));
} }
} }
} }
$email_list = array(); $email_list = array();
if(isset($HTTP_POST_VARS['ban_email'])) if ( isset($HTTP_POST_VARS['ban_email']) )
{ {
$email_list_temp = explode(",", $HTTP_POST_VARS['ban_email']); $email_list_temp = explode(',', $HTTP_POST_VARS['ban_email']);
for($i = 0; $i < count($email_list_temp); $i++) for($i = 0; $i < count($email_list_temp); $i++)
{ {
@ -154,7 +155,7 @@ if( isset($HTTP_POST_VARS['submit']) )
// contained in the annotated php manual at php.com (ereg // contained in the annotated php manual at php.com (ereg
// section) // section)
// //
if( eregi("^(([[:alnum:]\*]+([-_.][[:alnum:]\*]+)*\.?)|(\*))@([[:alnum:]]+([-_]?[[:alnum:]]+)*\.){1,3}([[:alnum:]]{2,6})$", trim($email_list_temp[$i])) ) if ( eregi('^(([[:alnum:]\*]+([-_.][[:alnum:]\*]+)*\.?)|(\*))@([[:alnum:]]+([-_]?[[:alnum:]]+)*\.){1,3}([[:alnum:]]{2,6})$', trim($email_list_temp[$i])) )
{ {
$email_list[] = trim($email_list_temp[$i]); $email_list[] = trim($email_list_temp[$i]);
} }
@ -163,32 +164,33 @@ if( isset($HTTP_POST_VARS['submit']) )
$sql = "SELECT * $sql = "SELECT *
FROM " . BANLIST_TABLE; FROM " . BANLIST_TABLE;
if( !$result = $db->sql_query($sql) ) if ( !($result = $db->sql_query($sql)) )
{ {
message_die(GENERAL_ERROR, "Couldn't obtain banlist information", "", __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, "Couldn't obtain banlist information", "", __LINE__, __FILE__, $sql);
} }
$current_banlist = $db->sql_fetchrowset($result); $current_banlist = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
$kill_session_sql = ""; $kill_session_sql = '';
for($i = 0; $i < count($user_list); $i++) for($i = 0; $i < count($user_list); $i++)
{ {
$in_banlist = false; $in_banlist = false;
for($j = 0; $j < count($current_banlist); $j++) for($j = 0; $j < count($current_banlist); $j++)
{ {
if($user_list[$i] == $current_banlist[$j]['ban_userid']) if ( $user_list[$i] == $current_banlist[$j]['ban_userid'] )
{ {
$in_banlist = true; $in_banlist = true;
} }
} }
if(!$in_banlist) if ( !$in_banlist )
{ {
$kill_session_sql .= ( ($kill_session_sql != "") ? " OR " : "" ) . "session_user_id = $user_list[$i]"; $kill_session_sql .= ( ( $kill_session_sql != '' ) ? ' OR ' : '' ) . "session_user_id = " . $user_list[$i];
$sql = "INSERT INTO " . BANLIST_TABLE . " (ban_userid) $sql = "INSERT INTO " . BANLIST_TABLE . " (ban_userid)
VALUES (" . $user_list[$i] . ")"; VALUES (" . $user_list[$i] . ")";
if( !$result = $db->sql_query($sql) ) if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, "Couldn't insert ban_userid info into database", "", __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, "Couldn't insert ban_userid info into database", "", __LINE__, __FILE__, $sql);
} }
@ -200,28 +202,28 @@ if( isset($HTTP_POST_VARS['submit']) )
$in_banlist = false; $in_banlist = false;
for($j = 0; $j < count($current_banlist); $j++) for($j = 0; $j < count($current_banlist); $j++)
{ {
if($ip_list[$i] == $current_banlist[$j]['ban_ip']) if ( $ip_list[$i] == $current_banlist[$j]['ban_ip'] )
{ {
$in_banlist = true; $in_banlist = true;
} }
} }
if(!$in_banlist) if ( !$in_banlist )
{ {
if( preg_match("/(ff\.)|(\.ff)/is", chunk_split($ip_list[$i], 2, ".")) ) if ( preg_match('/(ff\.)|(\.ff)/is', chunk_split($ip_list[$i], 2, '.')) )
{ {
$kill_ip_sql = "session_ip LIKE '" . str_replace(".", "", preg_replace("/(ff\.)|(\.ff)/is", "%", chunk_split($ip_list[$i], 2, "."))) . "'"; $kill_ip_sql = "session_ip LIKE '" . str_replace('.', '', preg_replace('/(ff\.)|(\.ff)/is', '%', chunk_split($ip_list[$i], 2, "."))) . "'";
} }
else else
{ {
$kill_ip_sql = "session_ip = '" . $ip_list[$i] . "'"; $kill_ip_sql = "session_ip = '" . $ip_list[$i] . "'";
} }
$kill_session_sql .= ( ($kill_session_sql != "") ? " OR " : "" ) . $kill_ip_sql; $kill_session_sql .= ( ( $kill_session_sql != '' ) ? ' OR ' : '' ) . $kill_ip_sql;
$sql = "INSERT INTO " . BANLIST_TABLE . " (ban_ip) $sql = "INSERT INTO " . BANLIST_TABLE . " (ban_ip)
VALUES ('" . $ip_list[$i] . "')"; VALUES ('" . $ip_list[$i] . "')";
if( !$result = $db->sql_query($sql) ) if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, "Couldn't insert ban_ip info into database", "", __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, "Couldn't insert ban_ip info into database", "", __LINE__, __FILE__, $sql);
} }
@ -229,18 +231,15 @@ if( isset($HTTP_POST_VARS['submit']) )
} }
// //
// Now we'll delete all entries from the // Now we'll delete all entries from the session table with any of the banned
// session table with any of the banned // user or IP info just entered into the ban table ... this will force a session
// user or IP info just entered into the // initialisation resulting in an instant ban
// ban table ... this will force a session
// initialisation resulting in an instant
// ban
// //
if( $kill_session_sql != "" ) if ( $kill_session_sql != '' )
{ {
$sql = "DELETE FROM " . SESSIONS_TABLE . " $sql = "DELETE FROM " . SESSIONS_TABLE . "
WHERE $kill_session_sql"; WHERE $kill_session_sql";
if( !$result = $db->sql_query($sql) ) if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, "Couldn't delete banned sessions from database", "", __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, "Couldn't delete banned sessions from database", "", __LINE__, __FILE__, $sql);
} }
@ -251,87 +250,75 @@ if( isset($HTTP_POST_VARS['submit']) )
$in_banlist = false; $in_banlist = false;
for($j = 0; $j < count($current_banlist); $j++) for($j = 0; $j < count($current_banlist); $j++)
{ {
if( $email_list[$i] == $current_banlist[$j]['ban_email'] ) if ( $email_list[$i] == $current_banlist[$j]['ban_email'] )
{ {
$in_banlist = true; $in_banlist = true;
} }
} }
if( !$in_banlist ) if ( !$in_banlist )
{ {
$sql = "INSERT INTO " . BANLIST_TABLE . " (ban_email) $sql = "INSERT INTO " . BANLIST_TABLE . " (ban_email)
VALUES ('" . str_replace("\'", "''", $email_list[$i]) . "')"; VALUES ('" . str_replace("\'", "''", $email_list[$i]) . "')";
if( !$result = $db->sql_query($sql) ) if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, "Couldn't insert ban_email info into database", "", __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, "Couldn't insert ban_email info into database", "", __LINE__, __FILE__, $sql);
} }
} }
} }
$where_sql = ""; $where_sql = '';
if(isset($HTTP_POST_VARS['unban_user'])) if ( isset($HTTP_POST_VARS['unban_user']) )
{ {
$user_list = $HTTP_POST_VARS['unban_user']; $user_list = $HTTP_POST_VARS['unban_user'];
for($i = 0; $i < count($user_list); $i++) for($i = 0; $i < count($user_list); $i++)
{ {
if($user_list[$i] != -1) if ( $user_list[$i] != -1 )
{ {
if($where_sql != "") $where_sql .= ( ( $where_sql != '' ) ? ', ' : '' ) . $user_list[$i];
{
$where_sql .= ", ";
}
$where_sql .= $user_list[$i];
} }
} }
} }
if( isset($HTTP_POST_VARS['unban_ip']) ) if ( isset($HTTP_POST_VARS['unban_ip']) )
{ {
$ip_list = $HTTP_POST_VARS['unban_ip']; $ip_list = $HTTP_POST_VARS['unban_ip'];
for($i = 0; $i < count($ip_list); $i++) for($i = 0; $i < count($ip_list); $i++)
{ {
if($ip_list[$i] != -1) if ( $ip_list[$i] != -1 )
{ {
if($where_sql != "") $where_sql .= ( ( $where_sql != '' ) ? ', ' : '' ) . $ip_list[$i];
{
$where_sql .= ", ";
}
$where_sql .= $ip_list[$i];
} }
} }
} }
if( isset($HTTP_POST_VARS['unban_email']) ) if ( isset($HTTP_POST_VARS['unban_email']) )
{ {
$email_list = $HTTP_POST_VARS['unban_email']; $email_list = $HTTP_POST_VARS['unban_email'];
for($i = 0; $i < count($email_list); $i++) for($i = 0; $i < count($email_list); $i++)
{ {
if($email_list[$i] != -1) if ( $email_list[$i] != -1 )
{ {
if($where_sql != "") $where_sql .= ( ( $where_sql != '' ) ? ', ' : '' ) . $email_list[$i];
{
$where_sql .= ", ";
}
$where_sql .= $email_list[$i];
} }
} }
} }
if( $where_sql != "" ) if ( $where_sql != '' )
{ {
$sql = "DELETE FROM " . BANLIST_TABLE . " $sql = "DELETE FROM " . BANLIST_TABLE . "
WHERE ban_id IN ($where_sql)"; WHERE ban_id IN ($where_sql)";
if( !$result = $db->sql_query($sql) ) if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, "Couldn't delete ban info from database", "", __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, "Couldn't delete ban info from database", "", __LINE__, __FILE__, $sql);
} }
} }
$message = $lang['Ban_update_sucessful'] . "<br /><br />" . sprintf($lang['Click_return_banadmin'], "<a href=\"" . append_sid("admin_user_ban.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); $message = $lang['Ban_update_sucessful'] . '<br /><br />' . sprintf($lang['Click_return_banadmin'], '<a href="' . append_sid("admin_user_ban.$phpEx") . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid("index.$phpEx?pane=right") . '">', '</a>');
message_die(GENERAL_MESSAGE, $message); message_die(GENERAL_MESSAGE, $message);
@ -354,37 +341,13 @@ else
'S_BANLIST_ACTION' => append_sid("admin_user_ban.$phpEx")) 'S_BANLIST_ACTION' => append_sid("admin_user_ban.$phpEx"))
); );
$userban_count = 0;
$sql = "SELECT user_id, username
FROM " . USERS_TABLE . "
WHERE user_id <> " . ANONYMOUS . "
ORDER BY username ASC";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select current user_id ban list', '', __LINE__, __FILE__, $sql);
}
$user_list = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
$select_userlist = '';
for($i = 0; $i < count($user_list); $i++)
{
$select_userlist .= '<option value="' . $user_list[$i]['user_id'] . '">' . $user_list[$i]['username'] . '</option>';
$userban_count++;
}
$select_userlist = '<select name="ban_user[]" multiple="multiple" size="5">' . $select_userlist . '</select>';
$template->assign_vars(array( $template->assign_vars(array(
'L_BAN_USER' => $lang['Ban_username'], 'L_BAN_USER' => $lang['Ban_username'],
'L_BAN_USER_EXPLAIN' => $lang['Ban_username_explain'], 'L_BAN_USER_EXPLAIN' => $lang['Ban_username_explain'],
'L_BAN_IP' => $lang['Ban_IP'], 'L_BAN_IP' => $lang['Ban_IP'],
'L_BAN_IP_EXPLAIN' => $lang['Ban_IP_explain'], 'L_BAN_IP_EXPLAIN' => $lang['Ban_IP_explain'],
'L_BAN_EMAIL' => $lang['Ban_email'], 'L_BAN_EMAIL' => $lang['Ban_email'],
'L_BAN_EMAIL_EXPLAIN' => $lang['Ban_email_explain'], 'L_BAN_EMAIL_EXPLAIN' => $lang['Ban_email_explain'])
'S_BAN_USERLIST_SELECT' => $select_userlist)
); );
$userban_count = 0; $userban_count = 0;
@ -469,8 +432,12 @@ else
'L_UNBAN_IP' => $lang['Unban_IP'], 'L_UNBAN_IP' => $lang['Unban_IP'],
'L_UNBAN_IP_EXPLAIN' => $lang['Unban_IP_explain'], 'L_UNBAN_IP_EXPLAIN' => $lang['Unban_IP_explain'],
'L_UNBAN_EMAIL' => $lang['Unban_email'], 'L_UNBAN_EMAIL' => $lang['Unban_email'],
'L_UNBAN_EMAIL_EXPLAIN' => $lang['Unban_email_explain'], 'L_UNBAN_EMAIL_EXPLAIN' => $lang['Unban_email_explain'],
'L_USERNAME' => $lang['Username'],
'L_LOOK_UP' => $lang['Look_up_User'],
'L_FIND_USERNAME' => $lang['Find_username'],
'U_SEARCH_USER' => append_sid("./../search.$phpEx?mode=searchuser"),
'S_UNBAN_USERLIST_SELECT' => $select_userlist, 'S_UNBAN_USERLIST_SELECT' => $select_userlist,
'S_UNBAN_IPLIST_SELECT' => $select_iplist, 'S_UNBAN_IPLIST_SELECT' => $select_iplist,
'S_UNBAN_EMAILLIST_SELECT' => $select_emaillist, 'S_UNBAN_EMAILLIST_SELECT' => $select_emaillist,
@ -480,6 +447,6 @@ else
$template->pparse('body'); $template->pparse('body');
include('page_footer_admin.'.$phpEx); include('./page_footer_admin.'.$phpEx);
?> ?>

View file

@ -30,9 +30,9 @@ if( !empty($setmodules) )
return; return;
} }
$phpbb_root_path = "../"; $phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc'); require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx); require('./pagestart.' . $phpEx);
require($phpbb_root_path . 'includes/bbcode.'.$phpEx); require($phpbb_root_path . 'includes/bbcode.'.$phpEx);
require($phpbb_root_path . 'includes/functions_post.'.$phpEx); require($phpbb_root_path . 'includes/functions_post.'.$phpEx);
require($phpbb_root_path . 'includes/functions_selects.'.$phpEx); require($phpbb_root_path . 'includes/functions_selects.'.$phpEx);
@ -159,10 +159,12 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
if( stripslashes($username) != $this_userdata['username'] ) if( stripslashes($username) != $this_userdata['username'] )
{ {
unset($rename_user); unset($rename_user);
if( !validate_username($username) )
$result = validate_username($username);
if ( $result['error'] )
{ {
$error = TRUE; $error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Invalid_username']; $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $result['error_msg'];
} }
else else
{ {
@ -971,7 +973,7 @@ if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) |
'L_ALWAYS_ADD_SIGNATURE' => $lang['Always_add_sig'], 'L_ALWAYS_ADD_SIGNATURE' => $lang['Always_add_sig'],
'L_SPECIAL' => $lang['User_special'], 'L_SPECIAL' => $lang['User_special'],
'L_SPECIAL_EXPLAIN' => $lang['User_specail_explain'], 'L_SPECIAL_EXPLAIN' => $lang['User_special_explain'],
'L_USER_ACTIVE' => $lang['User_status'], 'L_USER_ACTIVE' => $lang['User_status'],
'L_ALLOW_PM' => $lang['User_allowpm'], 'L_ALLOW_PM' => $lang['User_allowpm'],
'L_ALLOW_AVATAR' => $lang['User_allowavatar'], 'L_ALLOW_AVATAR' => $lang['User_allowavatar'],
@ -1035,19 +1037,6 @@ else
// //
// Default user selection box // Default user selection box
// //
$sql = "SELECT user_id, username
FROM " . USERS_TABLE . "
WHERE user_id <> " . ANONYMOUS ."
ORDER BY username";
$result = $db->sql_query($sql);
$select_list = '<select name="' . POST_USERS_URL . '">';
while( $row = $db->sql_fetchrow($result) )
{
$select_list .= '<option value="' . $row['user_id'] . '">' . $row['username'] . '</option>';
}
$select_list .= '</select>';
$template->set_filenames(array( $template->set_filenames(array(
'body' => 'admin/user_select_body.tpl') 'body' => 'admin/user_select_body.tpl')
); );
@ -1059,7 +1048,7 @@ else
'L_LOOK_UP' => $lang['Look_up_user'], 'L_LOOK_UP' => $lang['Look_up_user'],
'L_FIND_USERNAME' => $lang['Find_username'], 'L_FIND_USERNAME' => $lang['Find_username'],
'U_SEARCH_USER' => append_sid("../search.$phpEx?mode=searchuser"), 'U_SEARCH_USER' => append_sid("./../search.$phpEx?mode=searchuser"),
'S_USER_ACTION' => append_sid("admin_users.$phpEx"), 'S_USER_ACTION' => append_sid("admin_users.$phpEx"),
'S_USER_SELECT' => $select_list) 'S_USER_SELECT' => $select_list)
@ -1068,6 +1057,6 @@ else
} }
include('page_footer_admin.'.$phpEx); include('./page_footer_admin.'.$phpEx);
?> ?>

View file

@ -32,9 +32,9 @@ if( !empty($setmodules) )
// //
// Load default header // Load default header
// //
$phpbb_root_path = "../"; $phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc'); require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx); require('./pagestart.' . $phpEx);
if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{ {
@ -109,7 +109,7 @@ if( $mode != "" )
$template->pparse("body"); $template->pparse("body");
include('page_footer_admin.'.$phpEx); include('./page_footer_admin.'.$phpEx);
} }
else if( $mode == "save" ) else if( $mode == "save" )
{ {
@ -172,7 +172,7 @@ if( $mode != "" )
} }
else else
{ {
message_die(GENERAL_MESSAGE, $lang['Must_specify_word']); message_die(GENERAL_MESSAGE, $lang['No_word_selected']);
} }
} }
} }
@ -230,6 +230,6 @@ else
$template->pparse("body"); $template->pparse("body");
include('page_footer_admin.'.$phpEx); include('./page_footer_admin.'.$phpEx);
?> ?>

View file

@ -26,9 +26,9 @@ define('IN_PHPBB', 1);
// Load default header // Load default header
// //
$no_page_header = TRUE; $no_page_header = TRUE;
$phpbb_root_path = "../"; $phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc'); require($phpbb_root_path . 'extension.inc');
require('pagestart.' . $phpEx); require('./pagestart.' . $phpEx);
// --------------- // ---------------
// Begin functions // Begin functions
@ -68,7 +68,7 @@ if( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'left' )
unset($setmodules); unset($setmodules);
include('page_header_admin.'.$phpEx); include('./page_header_admin.'.$phpEx);
$template->set_filenames(array( $template->set_filenames(array(
"body" => "admin/index_navigate.tpl") "body" => "admin/index_navigate.tpl")
@ -116,12 +116,12 @@ if( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'left' )
$template->pparse("body"); $template->pparse("body");
include('page_footer_admin.'.$phpEx); include('./page_footer_admin.'.$phpEx);
} }
elseif( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'right' ) elseif( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'right' )
{ {
include('page_header_admin.'.$phpEx); include('./page_header_admin.'.$phpEx);
$template->set_filenames(array( $template->set_filenames(array(
"body" => "admin/index_body.tpl") "body" => "admin/index_body.tpl")
@ -561,7 +561,7 @@ elseif( isset($HTTP_GET_VARS['pane']) && $HTTP_GET_VARS['pane'] == 'right' )
$template->pparse("body"); $template->pparse("body");
include('page_footer_admin.'.$phpEx); include('./page_footer_admin.'.$phpEx);
} }
else else
@ -583,8 +583,9 @@ else
$template->pparse("body"); $template->pparse("body");
$db->sql_close();
exit; exit;
} }
?> ?>

View file

@ -28,27 +28,16 @@ if ( !defined('IN_PHPBB') )
// //
// Show the overall footer. // Show the overall footer.
// //
$current_time = time();
$template->set_filenames(array( $template->set_filenames(array(
"page_footer" => "admin/page_footer.tpl") 'page_footer' => 'admin/page_footer.tpl')
); );
$template->assign_vars(array( $template->assign_vars(array(
"PHPBB_VERSION" => "2.0 " . $board_config['version'], 'PHPBB_VERSION' => '2' . $board_config['version'],
"TRANSLATION_INFO" => $lang['TRANSLATION_INFO']) 'TRANSLATION_INFO' => $lang['TRANSLATION_INFO'])
); );
$template->pparse("page_footer"); $template->pparse('page_footer');
//
// Output page creation time
//
$mtime = microtime();
$mtime = explode(" ",$mtime);
$mtime = $mtime[1] + $mtime[0];
$endtime = $mtime;
$totaltime = ($endtime - $starttime);
// //
// Close our DB connection. // Close our DB connection.
@ -75,8 +64,8 @@ if( $do_gzip_compress )
echo "\x1f\x8b\x08\x00\x00\x00\x00\x00"; echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
echo $gzip_contents; echo $gzip_contents;
echo pack("V", $gzip_crc); echo pack('V', $gzip_crc);
echo pack("V", $gzip_size); echo pack('V', $gzip_size);
} }
exit; exit;

View file

@ -31,22 +31,22 @@ define('HEADER_INC', true);
// gzip_compression // gzip_compression
// //
$do_gzip_compress = FALSE; $do_gzip_compress = FALSE;
if($board_config['gzip_compress']) if ( $board_config['gzip_compress'] )
{ {
$phpver = phpversion(); $phpver = phpversion();
if($phpver >= '4.0.4pl1') if ( $phpver >= '4.0.4pl1' && strstr($HTTP_USER_AGENT,'compatible') )
{ {
if(extension_loaded('zlib')) if ( extension_loaded('zlib') )
{ {
ob_start('ob_gzhandler'); ob_start('ob_gzhandler');
} }
} }
else if($phpver > '4.0') else if ( $phpver > '4.0' )
{ {
if(strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip')) if ( strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip') )
{ {
if(extension_loaded('zlib')) if ( extension_loaded('zlib') )
{ {
$do_gzip_compress = TRUE; $do_gzip_compress = TRUE;
ob_start(); ob_start();
@ -72,30 +72,8 @@ $template->assign_vars(array(
'PAGE_TITLE' => $page_title, 'PAGE_TITLE' => $page_title,
'L_ADMIN' => $lang['Admin'], 'L_ADMIN' => $lang['Admin'],
'L_USERNAME' => $lang['Username'], 'L_INDEX' => sprintf($lang['Forum_Index'], $board_config['sitename']),
'L_PASSWORD' => $lang['Password'],
'L_INDEX' => $lang['Forum_Index'],
'L_REGISTER' => $lang['Register'],
'L_PROFILE' => $lang['Profile'],
'L_SEARCH' => $lang['Search'],
'L_PRIVATEMSGS' => $lang['Private_msgs'],
'L_MEMBERLIST' => $lang['Memberlist'],
'L_FAQ' => $lang['FAQ'], 'L_FAQ' => $lang['FAQ'],
'L_USERGROUPS' => $lang['Usergroups'],
'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_MODERATOR' => $lang['Moderator'],
'L_NONEWPOSTS' => $lang['No_new_posts'],
'L_NEWPOSTS' => $lang['New_posts'],
'L_POSTED' => $lang['Posted'],
'L_JOINED' => $lang['Joined'],
'L_AUTHOR' => $lang['Author'],
'L_MESSAGE' => $lang['Message'],
'L_BY' => $lang['by'],
'U_INDEX' => append_sid('../index.'.$phpEx), 'U_INDEX' => append_sid('../index.'.$phpEx),

View file

@ -39,7 +39,9 @@ init_userprefs($userdata);
// //
if( !$userdata['session_logged_in'] ) if( !$userdata['session_logged_in'] )
{ {
header("Location: ../" . append_sid("login.$phpEx?redirect=admin/")); $header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
header($header_location . '../' . append_sid("login.$phpEx?redirect=admin/"));
exit;
} }
else if( $userdata['user_level'] != ADMIN ) else if( $userdata['user_level'] != ADMIN )
{ {
@ -50,7 +52,7 @@ if ( empty($no_page_header) )
{ {
// Not including the pageheader can be neccesarry if META tags are // Not including the pageheader can be neccesarry if META tags are
// needed in the calling script. // needed in the calling script.
include('page_header_admin.'.$phpEx); include('./page_header_admin.'.$phpEx);
} }
?> ?>

View file

@ -101,18 +101,19 @@ if( !get_magic_quotes_gpc() )
// malicious rewriting of language and otherarray values via // malicious rewriting of language and otherarray values via
// URI params // URI params
// //
$board_config = Array(); $board_config = array();
$userdata = Array(); $userdata = array();
$theme = Array(); $theme = array();
$images = Array(); $images = array();
$lang = Array(); $lang = array();
$gen_simple_header = FALSE; $gen_simple_header = FALSE;
@include($phpbb_root_path . 'config.'.$phpEx); include($phpbb_root_path . 'config.'.$phpEx);
if( !defined("PHPBB_INSTALLED") ) if( !defined("PHPBB_INSTALLED") )
{ {
header("Location: install.$phpEx"); header("Location: install.$phpEx");
exit;
} }
include($phpbb_root_path . 'includes/constants.'.$phpEx); include($phpbb_root_path . 'includes/constants.'.$phpEx);
@ -153,7 +154,7 @@ if( getenv('HTTP_X_FORWARDED_FOR') != '' )
if ( preg_match("/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/", getenv('HTTP_X_FORWARDED_FOR'), $ip_list) ) if ( preg_match("/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/", getenv('HTTP_X_FORWARDED_FOR'), $ip_list) )
{ {
$private_ip = array('/^127\.0\.0\.1/', '/^192\.168\..*/', '/^172\.16\..*/', '/^10..*/', '/^224..*/', '/^240..*/'); $private_ip = array('/^0\./', '/^127\.0\.0\.1/', '/^192\.168\..*/', '/^172\.16\..*/', '/^10..*/', '/^224..*/', '/^240..*/');
$client_ip = preg_replace($private_ip, $client_ip, $ip_list[1]); $client_ip = preg_replace($private_ip, $client_ip, $ip_list[1]);
} }
} }
@ -170,16 +171,14 @@ $user_ip = encode_ip($client_ip);
// //
$sql = "SELECT * $sql = "SELECT *
FROM " . CONFIG_TABLE; FROM " . CONFIG_TABLE;
if(!$result = $db->sql_query($sql)) if( !($result = $db->sql_query($sql)) )
{ {
message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql); message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql);
} }
else
while ( $row = $db->sql_fetchrow($result) )
{ {
while($row = $db->sql_fetchrow($result)) $board_config[$row['config_name']] = $row['config_value'];
{
$board_config[$row['config_name']] = $row['config_value'];
}
} }
// //

View file

@ -137,7 +137,7 @@ class sql_db
$row_outer_max = ( isset($num_rows) ) ? $row_offset + $num_rows + 1 : 1E9; $row_outer_max = ( isset($num_rows) ) ? $row_offset + $num_rows + 1 : 1E9;
$row_inner = 0; $row_inner = 0;
while( odbc_fetch_row($this->result, $row_outer) && $row_outer < $row_outer_max ) while( odbc_fetch_row($this->result) && $row_outer < $row_outer_max )
{ {
for($j = 0; $j < count($this->field_names[$this->result]); $j++) for($j = 0; $j < count($this->field_names[$this->result]); $j++)
{ {

View file

@ -291,6 +291,7 @@ class sql_db
{ {
$row[$key] = stripslashes($value); $row[$key] = stripslashes($value);
} }
@reset($row);
return $row; return $row;
} }
@ -320,6 +321,7 @@ class sql_db
} }
$i++; $i++;
} }
@reset($rowset);
return $rowset; return $rowset;
} }

View file

@ -63,11 +63,11 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('gzip_compress','0'
INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_fax', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_fax', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_mail', ''); INSERT INTO phpbb_config (config_name, config_value) VALUES ('coppa_mail', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_users', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_users', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_users', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_date', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_name', 'www.yourdomain.tld'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_name', 'www.yourdomain.tld');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', 'RC-4'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.1');
/* /*
-- Categories -- Categories
@ -167,38 +167,36 @@ INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 9, ':
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 10, ':o', 'icon_surprised.gif', 'Surprised'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 10, ':o', 'icon_surprised.gif', 'Surprised');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 11, ':-o', 'icon_surprised.gif', 'Surprised'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 11, ':-o', 'icon_surprised.gif', 'Surprised');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 12, ':eek:', 'icon_surprised.gif', 'Surprised'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 12, ':eek:', 'icon_surprised.gif', 'Surprised');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 13, '8O', 'icon_eek.gif', 'Shocked'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 13, ':shock:', 'icon_eek.gif', 'Shocked');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 14, '8-O', 'icon_eek.gif', 'Shocked'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 14, ':?', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 15, ':shock:', 'icon_eek.gif', 'Shocked'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 15, ':-?', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 16, ':?', 'icon_confused.gif', 'Confused'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 16, ':???:', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 17, ':-?', 'icon_confused.gif', 'Confused'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 17, '8)', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 18, ':???:', 'icon_confused.gif', 'Confused'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 18, '8-)', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 19, '8)', 'icon_cool.gif', 'Cool'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 19, ':cool:', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 20, '8-)', 'icon_cool.gif', 'Cool'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 20, ':lol:', 'icon_lol.gif', 'Laughing');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 21, ':cool:', 'icon_cool.gif', 'Cool'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 21, ':x', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 22, ':lol:', 'icon_lol.gif', 'Laughing'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 22, ':-x', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 23, ':x', 'icon_mad.gif', 'Mad'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 23, ':mad:', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 24, ':-x', 'icon_mad.gif', 'Mad'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 24, ':P', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 25, ':mad:', 'icon_mad.gif', 'Mad'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 25, ':-P', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 26, ':P', 'icon_razz.gif', 'Razz'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 26, ':razz:', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 27, ':-P', 'icon_razz.gif', 'Razz'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 27, ':oops:', 'icon_redface.gif', 'Embarassed');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 28, ':razz:', 'icon_razz.gif', 'Razz'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 28, ':cry:', 'icon_cry.gif', 'Crying or Very sad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 29, ':oops:', 'icon_redface.gif', 'Embarassed'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 29, ':evil:', 'icon_evil.gif', 'Evil or Very Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 30, ':cry:', 'icon_cry.gif', 'Crying or Very sad'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 30, ':twisted:', 'icon_twisted.gif', 'Twisted Evil');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 31, ':evil:', 'icon_evil.gif', 'Evil or Very Mad'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 31, ':roll:', 'icon_rolleyes.gif', 'Rolling Eyes');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 32, ':twisted:', 'icon_twisted.gif', 'Twisted Evil'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 32, ':wink:', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 33, ':roll:', 'icon_rolleyes.gif', 'Rolling Eyes'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 33, ';)', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 34, ':wink:', 'icon_wink.gif', 'Wink'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 34, ';-)', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 35, ';)', 'icon_wink.gif', 'Wink'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 35, ':!:', 'icon_exclaim.gif', 'Exclamation');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 36, ';-)', 'icon_wink.gif', 'Wink'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 36, ':?:', 'icon_question.gif', 'Question');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 37, ':!:', 'icon_exclaim.gif', 'Exclamation'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 37, ':idea:', 'icon_idea.gif', 'Idea');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 38, ':?:', 'icon_question.gif', 'Question'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 38, ':arrow:', 'icon_arrow.gif', 'Arrow');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 39, ':idea:', 'icon_idea.gif', 'Idea'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 39, ':|', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 40, ':arrow:', 'icon_arrow.gif', 'Arrow'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 40, ':-|', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 41, ':|', 'icon_neutral.gif', 'Neutral'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 41, ':neutral:', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 42, ':-|', 'icon_neutral.gif', 'Neutral'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 42, ':mrgreen:', 'icon_mrgreen.gif', 'Mr. Green');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 43, ':neutral:', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 44, ':mrgreen:', 'icon_mrgreen.gif', 'Mr. Green');
SET IDENTITY_INSERT phpbb_smilies OFF; SET IDENTITY_INSERT phpbb_smilies OFF;

View file

@ -318,7 +318,7 @@ CREATE TABLE [phpbb_users] (
[user_regdate] [int] NOT NULL , [user_regdate] [int] NOT NULL ,
[user_level] [smallint] NOT NULL , [user_level] [smallint] NOT NULL ,
[user_posts] [int] NOT NULL , [user_posts] [int] NOT NULL ,
[user_timezone] [real] NOT NULL , [user_timezone] [decimal] (4,2) NOT NULL ,
[user_style] [int] NULL , [user_style] [int] NULL ,
[user_lang] [varchar] (255) NULL , [user_lang] [varchar] (255) NULL ,
[user_dateformat] [varchar] (14) NOT NULL , [user_dateformat] [varchar] (14) NOT NULL ,

View file

@ -60,7 +60,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_date
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_name', 'www.myserver.tld'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_name', 'www.myserver.tld');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', 'RC-4'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.1');
# -- Categories # -- Categories
@ -120,38 +120,36 @@ INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 9, ':
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 10, ':o', 'icon_surprised.gif', 'Surprised'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 10, ':o', 'icon_surprised.gif', 'Surprised');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 11, ':-o', 'icon_surprised.gif', 'Surprised'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 11, ':-o', 'icon_surprised.gif', 'Surprised');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 12, ':eek:', 'icon_surprised.gif', 'Surprised'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 12, ':eek:', 'icon_surprised.gif', 'Surprised');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 13, '8O', 'icon_eek.gif', 'Shocked'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 13, ':shock:', 'icon_eek.gif', 'Shocked');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 14, '8-O', 'icon_eek.gif', 'Shocked'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 14, ':?', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 15, ':shock:', 'icon_eek.gif', 'Shocked'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 15, ':-?', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 16, ':?', 'icon_confused.gif', 'Confused'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 16, ':???:', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 17, ':-?', 'icon_confused.gif', 'Confused'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 17, '8)', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 18, ':???:', 'icon_confused.gif', 'Confused'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 18, '8-)', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 19, '8)', 'icon_cool.gif', 'Cool'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 19, ':cool:', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 20, '8-)', 'icon_cool.gif', 'Cool'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 20, ':lol:', 'icon_lol.gif', 'Laughing');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 21, ':cool:', 'icon_cool.gif', 'Cool'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 21, ':x', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 22, ':lol:', 'icon_lol.gif', 'Laughing'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 22, ':-x', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 23, ':x', 'icon_mad.gif', 'Mad'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 23, ':mad:', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 24, ':-x', 'icon_mad.gif', 'Mad'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 24, ':P', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 25, ':mad:', 'icon_mad.gif', 'Mad'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 25, ':-P', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 26, ':P', 'icon_razz.gif', 'Razz'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 26, ':razz:', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 27, ':-P', 'icon_razz.gif', 'Razz'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 27, ':oops:', 'icon_redface.gif', 'Embarassed');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 28, ':razz:', 'icon_razz.gif', 'Razz'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 28, ':cry:', 'icon_cry.gif', 'Crying or Very sad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 29, ':oops:', 'icon_redface.gif', 'Embarassed'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 29, ':evil:', 'icon_evil.gif', 'Evil or Very Mad');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 30, ':cry:', 'icon_cry.gif', 'Crying or Very sad'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 30, ':twisted:', 'icon_twisted.gif', 'Twisted Evil');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 31, ':evil:', 'icon_evil.gif', 'Evil or Very Mad'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 31, ':roll:', 'icon_rolleyes.gif', 'Rolling Eyes');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 32, ':twisted:', 'icon_twisted.gif', 'Twisted Evil'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 32, ':wink:', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 33, ':roll:', 'icon_rolleyes.gif', 'Rolling Eyes'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 33, ';)', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 34, ':wink:', 'icon_wink.gif', 'Wink'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 34, ';-)', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 35, ';)', 'icon_wink.gif', 'Wink'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 35, ':!:', 'icon_exclaim.gif', 'Exclamation');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 36, ';-)', 'icon_wink.gif', 'Wink'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 36, ':?:', 'icon_question.gif', 'Question');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 37, ':!:', 'icon_exclaim.gif', 'Exclamation'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 37, ':idea:', 'icon_idea.gif', 'Idea');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 38, ':?:', 'icon_question.gif', 'Question'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 38, ':arrow:', 'icon_arrow.gif', 'Arrow');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 39, ':idea:', 'icon_idea.gif', 'Idea'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 39, ':|', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 40, ':arrow:', 'icon_arrow.gif', 'Arrow'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 40, ':-|', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 41, ':|', 'icon_neutral.gif', 'Neutral'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 41, ':neutral:', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 42, ':-|', 'icon_neutral.gif', 'Neutral'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 42, ':mrgreen:', 'icon_mrgreen.gif', 'Mr. Green');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 43, ':neutral:', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 44, ':mrgreen:', 'icon_mrgreen.gif', 'Mr. Green');
# -- wordlist # -- wordlist

View file

@ -42,7 +42,7 @@ CREATE TABLE phpbb_user_group (
# Table structure for table 'phpbb_groups' # Table structure for table 'phpbb_groups'
# #
CREATE TABLE phpbb_groups ( CREATE TABLE phpbb_groups (
group_id mediumint(8) NOT NULL auto_increment, group_id mediumint(8) NOT NULL,
group_type tinyint(4) DEFAULT '1' NOT NULL, group_type tinyint(4) DEFAULT '1' NOT NULL,
group_name varchar(40) NOT NULL, group_name varchar(40) NOT NULL,
group_description varchar(255) NOT NULL, group_description varchar(255) NOT NULL,
@ -453,7 +453,7 @@ CREATE TABLE phpbb_topics_watch (
# Table structure for table 'phpbb_users' # Table structure for table 'phpbb_users'
# #
CREATE TABLE phpbb_users ( CREATE TABLE phpbb_users (
user_id mediumint(8) NOT NULL auto_increment, user_id mediumint(8) NOT NULL,
user_active tinyint(1) DEFAULT '1', user_active tinyint(1) DEFAULT '1',
username varchar(25) NOT NULL, username varchar(25) NOT NULL,
user_password varchar(32) NOT NULL, user_password varchar(32) NOT NULL,
@ -463,7 +463,7 @@ CREATE TABLE phpbb_users (
user_regdate int(11) DEFAULT '0' NOT NULL, user_regdate int(11) DEFAULT '0' NOT NULL,
user_level tinyint(4) DEFAULT '0', user_level tinyint(4) DEFAULT '0',
user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_timezone float DEFAULT '0' NOT NULL, user_timezone decimal(4,2) DEFAULT '0' NOT NULL,
user_style tinyint(4), user_style tinyint(4),
user_lang varchar(255), user_lang varchar(255),
user_dateformat varchar(14) DEFAULT 'd M Y H:i' NOT NULL, user_dateformat varchar(14) DEFAULT 'd M Y H:i' NOT NULL,

View file

@ -61,7 +61,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_date
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_name', 'www.yourdomain.tld'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_name', 'www.yourdomain.tld');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', 'RC-4'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.1');
-- Categories -- Categories
INSERT INTO phpbb_categories (cat_id, cat_title, cat_order) VALUES (1, 'Test category 1', 10); INSERT INTO phpbb_categories (cat_id, cat_title, cat_order) VALUES (1, 'Test category 1', 10);
@ -107,50 +107,48 @@ INSERT INTO phpbb_themes_name (themes_id, tr_color1_name, tr_color2_name, tr_col
-- Smilies -- Smilies
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':D', 'icon_biggrin.gif', 'Very Happy'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 1, ':D', 'icon_biggrin.gif', 'Very Happy');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':-D', 'icon_biggrin.gif', 'Very Happy'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 2, ':-D', 'icon_biggrin.gif', 'Very Happy');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':grin:', 'icon_biggrin.gif', 'Very Happy'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 3, ':grin:', 'icon_biggrin.gif', 'Very Happy');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':)', 'icon_smile.gif', 'Smile'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 4, ':)', 'icon_smile.gif', 'Smile');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':-)', 'icon_smile.gif', 'Smile'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 5, ':-)', 'icon_smile.gif', 'Smile');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':smile:', 'icon_smile.gif', 'Smile'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 6, ':smile:', 'icon_smile.gif', 'Smile');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':(', 'icon_sad.gif', 'Sad'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 7, ':(', 'icon_sad.gif', 'Sad');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':-(', 'icon_sad.gif', 'Sad'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 8, ':-(', 'icon_sad.gif', 'Sad');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':sad:', 'icon_sad.gif', 'Sad'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 9, ':sad:', 'icon_sad.gif', 'Sad');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':o', 'icon_surprised.gif', 'Surprised'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 10, ':o', 'icon_surprised.gif', 'Surprised');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':-o', 'icon_surprised.gif', 'Surprised'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 11, ':-o', 'icon_surprised.gif', 'Surprised');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':eek:', 'icon_surprised.gif', 'Surprised'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 12, ':eek:', 'icon_surprised.gif', 'Surprised');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( '8O', 'icon_eek.gif', 'Shocked'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 13, ':shock:', 'icon_eek.gif', 'Shocked');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( '8-O', 'icon_eek.gif', 'Shocked'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 14, ':?', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':shock:', 'icon_eek.gif', 'Shocked'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 15, ':-?', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':?', 'icon_confused.gif', 'Confused'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 16, ':???:', 'icon_confused.gif', 'Confused');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':-?', 'icon_confused.gif', 'Confused'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 17, '8)', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':???:', 'icon_confused.gif', 'Confused'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 18, '8-)', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( '8)', 'icon_cool.gif', 'Cool'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 19, ':cool:', 'icon_cool.gif', 'Cool');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( '8-)', 'icon_cool.gif', 'Cool'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 20, ':lol:', 'icon_lol.gif', 'Laughing');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':cool:', 'icon_cool.gif', 'Cool'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 21, ':x', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':lol:', 'icon_lol.gif', 'Laughing'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 22, ':-x', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':x', 'icon_mad.gif', 'Mad'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 23, ':mad:', 'icon_mad.gif', 'Mad');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':-x', 'icon_mad.gif', 'Mad'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 24, ':P', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':mad:', 'icon_mad.gif', 'Mad'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 25, ':-P', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':P', 'icon_razz.gif', 'Razz'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 26, ':razz:', 'icon_razz.gif', 'Razz');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':-P', 'icon_razz.gif', 'Razz'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 27, ':oops:', 'icon_redface.gif', 'Embarassed');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':razz:', 'icon_razz.gif', 'Razz'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 28, ':cry:', 'icon_cry.gif', 'Crying or Very sad');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':oops:', 'icon_redface.gif', 'Embarassed'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 29, ':evil:', 'icon_evil.gif', 'Evil or Very Mad');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':cry:', 'icon_cry.gif', 'Crying or Very sad'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 30, ':twisted:', 'icon_twisted.gif', 'Twisted Evil');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':evil:', 'icon_evil.gif', 'Evil or Very Mad'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 31, ':roll:', 'icon_rolleyes.gif', 'Rolling Eyes');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':twisted:', 'icon_twisted.gif', 'Twisted Evil'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 32, ':wink:', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':roll:', 'icon_rolleyes.gif', 'Rolling Eyes'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 33, ';)', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':wink:', 'icon_wink.gif', 'Wink'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 34, ';-)', 'icon_wink.gif', 'Wink');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ';)', 'icon_wink.gif', 'Wink'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 35, ':!:', 'icon_exclaim.gif', 'Exclamation');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ';-)', 'icon_wink.gif', 'Wink'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 36, ':?:', 'icon_question.gif', 'Question');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':!:', 'icon_exclaim.gif', 'Exclamation'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 37, ':idea:', 'icon_idea.gif', 'Idea');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':?:', 'icon_question.gif', 'Question'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 38, ':arrow:', 'icon_arrow.gif', 'Arrow');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':idea:', 'icon_idea.gif', 'Idea'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 39, ':|', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':arrow:', 'icon_arrow.gif', 'Arrow'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 40, ':-|', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':|', 'icon_neutral.gif', 'Neutral'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 41, ':neutral:', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':-|', 'icon_neutral.gif', 'Neutral'); INSERT INTO phpbb_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 42, ':mrgreen:', 'icon_mrgreen.gif', 'Mr. Green');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':neutral:', 'icon_neutral.gif', 'Neutral');
INSERT INTO phpbb_smilies (code, smile_url, emoticon) VALUES ( ':mrgreen:', 'icon_mrgreen.gif', 'Mr. Green');
-- wordlist -- wordlist

View file

@ -478,7 +478,7 @@ CREATE TABLE phpbb_users (
user_avatar_type int2 DEFAULT '0' NOT NULL, user_avatar_type int2 DEFAULT '0' NOT NULL,
user_level int4 DEFAULT '1', user_level int4 DEFAULT '1',
user_lang varchar(255), user_lang varchar(255),
user_timezone real DEFAULT '0' NOT NULL, user_timezone decimal(4) DEFAULT '0' NOT NULL,
user_dateformat varchar(14) DEFAULT 'd M Y H:m' NOT NULL, user_dateformat varchar(14) DEFAULT 'd M Y H:m' NOT NULL,
user_notify_pm int2 DEFAULT '1' NOT NULL, user_notify_pm int2 DEFAULT '1' NOT NULL,
user_popup_pm int2 DEFAULT '0' NOT NULL, user_popup_pm int2 DEFAULT '0' NOT NULL,

View file

@ -0,0 +1,73 @@
<?php
/***************************************************************************
* revar_lang_files.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id$
*
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
//
// Security message:
//
// This script is potentially dangerous.
// 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");
$dirname = "./../language";
$dir = opendir($dirname);
while ( $file = readdir($dir) )
{
if ( ereg('^lang_', $file) && !is_file($dirname . '/' . $file) && !is_link($dirname . '/' . $file) )
{
include($dirname . '/' . $file . '/lang_main.php');
$lang_dir = opendir($dirname . '/' . $file . '/email');
while ( $email = readdir($lang_dir) )
{
if ( ereg('\.tpl$', $email) && is_file($dirname . '/' . $file . '/email/' . $email) )
{
$fp = fopen($dirname . '/' . $file . '/email/' . $email, 'r+');
$email_file = "";
while ( $line = fread($fp, 100000) )
{
$email_file .= $line;
}
if ( !preg_match('/^Charset: .*?$/m', $email_file) )
{
$email_file = preg_replace('/^((Subject: .*?\n)(\n))?/i', "\\2Charset: " . $lang['ENCODING'] . "\n\n", $email_file);
}
echo '<b>' . $dirname . '/' . $file . '/email/' . $email . "</b><br />\n";
echo nl2br($email_file);
echo "\n\n<br /><br />\n\n";
fseek($fp, 0);
fwrite($fp, $email_file);
fclose($fp);
}
}
echo "\n\n<hr />\n\n";
}
}
?>

View file

@ -29,7 +29,7 @@ include($phpbb_root_path . 'common.'.$phpEx);
// //
function generate_user_info(&$row, $date_format, $group_mod, &$from, &$posts, &$joined, &$poster_avatar, &$profile_img, &$profile, &$search_img, &$search, &$pm_img, &$pm, &$email_img, &$email, &$www_img, &$www, &$icq_status_img, &$icq_img, &$icq, &$aim_img, &$aim, &$msn_img, &$msn, &$yim_img, &$yim) function generate_user_info(&$row, $date_format, $group_mod, &$from, &$posts, &$joined, &$poster_avatar, &$profile_img, &$profile, &$search_img, &$search, &$pm_img, &$pm, &$email_img, &$email, &$www_img, &$www, &$icq_status_img, &$icq_img, &$icq, &$aim_img, &$aim, &$msn_img, &$msn, &$yim_img, &$yim)
{ {
global $lang, $images, $board_config; global $lang, $images, $board_config, $phpEx;
$from = ( !empty($row['user_from']) ) ? $row['user_from'] : '&nbsp;'; $from = ( !empty($row['user_from']) ) ? $row['user_from'] : '&nbsp;';
$joined = create_date($date_format, $row['user_regdate'], $board_config['board_timezone']); $joined = create_date($date_format, $row['user_regdate'], $board_config['board_timezone']);
@ -159,6 +159,7 @@ if ( isset($HTTP_POST_VARS['groupstatus']) && $group_id )
if ( !$userdata['session_logged_in'] ) if ( !$userdata['session_logged_in'] )
{ {
header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true)); header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
exit;
} }
$sql = "SELECT group_moderator $sql = "SELECT group_moderator
@ -207,7 +208,8 @@ else if ( isset($HTTP_POST_VARS['joingroup']) && $group_id )
// //
if ( !$userdata['session_logged_in'] ) if ( !$userdata['session_logged_in'] )
{ {
header($header_location . ppend_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true)); header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
exit;
} }
$sql = "SELECT ug.user_id, g.group_type $sql = "SELECT ug.user_id, g.group_type
@ -275,7 +277,7 @@ else if ( isset($HTTP_POST_VARS['joingroup']) && $group_id )
include($phpbb_root_path . 'includes/emailer.'.$phpEx); include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']); $emailer = new emailer($board_config['smtp_delivery']);
$email_headers = 'From: ' . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\r\n"; $email_headers = 'From: ' . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\n";
$emailer->use_template('group_request', $moderator['user_lang']); $emailer->use_template('group_request', $moderator['user_lang']);
$emailer->email_address($moderator['user_email']); $emailer->email_address($moderator['user_email']);
@ -308,11 +310,13 @@ else if ( isset($HTTP_POST_VARS['unsub']) || isset($HTTP_POST_VARS['unsubpending
// //
if ( $cancel ) if ( $cancel )
{ {
header($header_location . ppend_sid("groupcp.$phpEx", true)); header($header_location . append_sid("groupcp.$phpEx", true));
exit;
} }
elseif ( !$userdata['session_logged_in'] ) elseif ( !$userdata['session_logged_in'] )
{ {
header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true)); header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
exit;
} }
if ( $confirm ) if ( $confirm )
@ -396,6 +400,7 @@ else if ( $group_id )
if ( !$userdata['session_logged_in'] ) if ( !$userdata['session_logged_in'] )
{ {
header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true)); header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
exit;
} }
} }
@ -457,6 +462,7 @@ else if ( $group_id )
if ( !$userdata['session_logged_in'] ) if ( !$userdata['session_logged_in'] )
{ {
header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true)); header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
exit;
} }
if ( !$is_moderator ) if ( !$is_moderator )
@ -553,7 +559,7 @@ else if ( $group_id )
include($phpbb_root_path . 'includes/emailer.'.$phpEx); include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']); $emailer = new emailer($board_config['smtp_delivery']);
$email_headers = 'From: ' . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\r\n"; $email_headers = 'From: ' . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\n";
$emailer->use_template('group_added', $row['user_lang']); $emailer->use_template('group_added', $row['user_lang']);
$emailer->email_address($row['user_email']); $emailer->email_address($row['user_email']);
@ -708,7 +714,7 @@ else if ( $group_id )
include($phpbb_root_path . 'includes/emailer.'.$phpEx); include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']); $emailer = new emailer($board_config['smtp_delivery']);
$email_headers = 'From: ' . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\nBcc: " . $email_addresses . "\r\n"; $email_headers = 'From: ' . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\nBcc: " . $email_addresses . "\n";
$emailer->use_template('group_approved'); $emailer->use_template('group_approved');
$emailer->email_address($userdata['user_email']); $emailer->email_address($userdata['user_email']);
@ -912,7 +918,8 @@ else if ( $group_id )
'L_PENDING_MEMBERS' => $lang['Pending_members'], 'L_PENDING_MEMBERS' => $lang['Pending_members'],
'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'], 'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'],
'L_PM' => $lang['Private_Message'], 'L_PM' => $lang['Private_Message'],
'L_EMAIL' => $lang['Email'], 'L_EMAIL' => $lang['Email'],
'L_POSTS' => $lang['Posts'],
'L_WEBSITE' => $lang['Website'], 'L_WEBSITE' => $lang['Website'],
'L_FROM' => $lang['Location'], 'L_FROM' => $lang['Location'],
'L_ORDER' => $lang['Order'], 'L_ORDER' => $lang['Order'],

View file

@ -158,18 +158,18 @@ function auth($type, $forum_id, $userdata, $f_access = '')
if ( $row = $db->sql_fetchrow($result) ) if ( $row = $db->sql_fetchrow($result) )
{ {
if ( $forum_id != AUTH_LIST_ALL) do
{ {
$u_access[] = $row; if ( $forum_id != AUTH_LIST_ALL)
} {
else $u_access[] = $row;
{ }
do else
{ {
$u_access[$row['forum_id']][] = $row; $u_access[$row['forum_id']][] = $row;
} }
while( $row = $db->sql_fetchrow($result) );
} }
while( $row = $db->sql_fetchrow($result) );
} }
} }

View file

@ -251,7 +251,7 @@ function bbencode_first_pass($text, $uid)
// [QUOTE] and [/QUOTE] for posting replies with quote, or just for quoting stuff. // [QUOTE] and [/QUOTE] for posting replies with quote, or just for quoting stuff.
$text = bbencode_first_pass_pda($text, $uid, '[quote]', '[/quote]', '', false, ''); $text = bbencode_first_pass_pda($text, $uid, '[quote]', '[/quote]', '', false, '');
$text = bbencode_first_pass_pda($text, $uid, '/\[quote=(\\\\".*?\\\\")\]/is', '[/quote]', '', false, '', "[quote:$uid=\\1]"); $text = bbencode_first_pass_pda($text, $uid, '/\[quote=(\\\\"[^"]*?\\\\")\]/is', '[/quote]', '', false, '', "[quote:$uid=\\1]");
// [list] and [list=x] for (un)ordered lists. // [list] and [list=x] for (un)ordered lists.
$open_tag = array(); $open_tag = array();
@ -282,7 +282,7 @@ function bbencode_first_pass($text, $uid)
$text = preg_replace("#\[i\](.*?)\[/i\]#si", "[i:$uid]\\1[/i:$uid]", $text); $text = preg_replace("#\[i\](.*?)\[/i\]#si", "[i:$uid]\\1[/i:$uid]", $text);
// [img]image_url_here[/img] code.. // [img]image_url_here[/img] code..
$text = preg_replace("#\[img\](([a-z]+?)://([^ \n\r]+?))\[/img\]#si", "[img:$uid]\\1[/img:$uid]", $text); $text = preg_replace("#\[img\](([a-z]+?)://([^ \"\n\r]+?))\[/img\]#si", "[img:$uid]\\1[/img:$uid]", $text);
// Remove our padding from the string.. // Remove our padding from the string..
$text = substr($text, 1); $text = substr($text, 1);
@ -433,7 +433,13 @@ function bbencode_first_pass_pda($text, $uid, $open_tag, $close_tag, $close_tag_
// Push its position, the text we matched, and its index in the open_tag array on to the stack, and then keep going to the right. // Push its position, the text we matched, and its index in the open_tag array on to the stack, and then keep going to the right.
$match = array("pos" => $curr_pos, "tag" => $which_start_tag, "index" => $start_tag_index); $match = array("pos" => $curr_pos, "tag" => $which_start_tag, "index" => $start_tag_index);
bbcode_array_push($stack, $match); bbcode_array_push($stack, $match);
++$curr_pos; //
// Rather than just increment $curr_pos
// Set it to the ending of the tag we just found
// Keeps error in nested tag from breaking out
// of table structure..
//
$curr_pos = $curr_pos + strlen($possible_start);
} }
else else
{ {
@ -477,20 +483,34 @@ function bbencode_first_pass_pda($text, $uid, $open_tag, $close_tag, $close_tag_
// Mark the lowest nesting level if needed. // Mark the lowest nesting level if needed.
if ($mark_lowest_level && ($curr_nesting_depth == 1)) if ($mark_lowest_level && ($curr_nesting_depth == 1))
{ {
if ($open_tag[0] == '[code]')
{
$code_entities_match = array('#<#', '#>#', '#"#', '#:#', '#\[#', '#\]#', '#\(#', '#\)#', '#\{#', '#\}#');
$code_entities_replace = array('&lt;', '&gt;', '&quot;', '&#58;', '&#91;', '&#93;', '&#40;', '&#41;', '&#123;', '&#125;');
$between_tags = preg_replace($code_entities_match, $code_entities_replace, $between_tags);
}
$text = $before_start_tag . substr($start_tag, 0, $start_length - 1) . ":$curr_nesting_depth:$uid]"; $text = $before_start_tag . substr($start_tag, 0, $start_length - 1) . ":$curr_nesting_depth:$uid]";
$text .= $between_tags . substr($close_tag_new, 0, $close_tag_new_length - 1) . ":$curr_nesting_depth:$uid]"; $text .= $between_tags . substr($close_tag_new, 0, $close_tag_new_length - 1) . ":$curr_nesting_depth:$uid]";
} }
else else
{ {
if ($open_is_regexp) if ($open_tag[0] == '[code]')
{ {
$text = $before_start_tag . $start_tag; $text = $before_start_tag . '&#91;code&#93;';
$text .= $between_tags . '&#91;/code&#93;';
} }
else else
{ {
$text = $before_start_tag . substr($start_tag, 0, $start_length - 1) . ":$uid]"; if ($open_is_regexp)
{
$text = $before_start_tag . $start_tag;
}
else
{
$text = $before_start_tag . substr($start_tag, 0, $start_length - 1) . ":$uid]";
}
$text .= $between_tags . substr($close_tag_new, 0, $close_tag_new_length - 1) . ":$uid]";
} }
$text .= $between_tags . substr($close_tag_new, 0, $close_tag_new_length - 1) . ":$uid]";
} }
$text .= $after_end_tag; $text .= $after_end_tag;
@ -600,7 +620,7 @@ function make_clickable($text)
// matches an "xxxx://yyyy" URL at the start of a line, or after a space. // matches an "xxxx://yyyy" URL at the start of a line, or after a space.
// xxxx can only be alpha characters. // xxxx can only be alpha characters.
// yyyy is anything up to the first space, newline, or comma. // yyyy is anything up to the first space, newline, or comma.
$ret = preg_replace("#([\n ])([a-z]+?)://([^,\t \n\r]+)#i", "\\1<a href=\"\\2://\\3\" target=\"_blank\">\\2://\\3</a>", $ret); $ret = preg_replace("#([\n ])([a-z]+?)://([^\t <\n\r]+)#i", "\\1<a href=\"\\2://\\3\" target=\"_blank\">\\2://\\3</a>", $ret);
// matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing // matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing
// Must contain at least 2 dots. xxxx contains either alphanum, or "-" // Must contain at least 2 dots. xxxx contains either alphanum, or "-"
@ -608,7 +628,7 @@ function make_clickable($text)
// zzzz is optional.. will contain everything up to the first space, newline, or comma. // zzzz is optional.. will contain everything up to the first space, newline, or comma.
// This is slightly restrictive - it's not going to match stuff like "forums.foo.com" // This is slightly restrictive - it's not going to match stuff like "forums.foo.com"
// This is to keep it from getting annoying and matching stuff that's not meant to be a link. // This is to keep it from getting annoying and matching stuff that's not meant to be a link.
$ret = preg_replace("#([\n ])www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[^,\t \n\r]*)?)#i", "\\1<a href=\"http://www.\\2.\\3\\4\" target=\"_blank\">www.\\2.\\3\\4</a>", $ret); $ret = preg_replace("#([\n ])www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[^\t <\n\r]*)?)#i", "\\1<a href=\"http://www.\\2.\\3\\4\" target=\"_blank\">www.\\2.\\3\\4</a>", $ret);
// matches an email@domain type address at the start of a line, or after a space. // matches an email@domain type address at the start of a line, or after a space.
// Note: Only the followed chars are valid; alphanums, "-", "_" and or ".". // Note: Only the followed chars are valid; alphanums, "-", "_" and or ".".
@ -765,4 +785,4 @@ function smiley_sort($a, $b)
} }
?> ?>

View file

@ -38,8 +38,8 @@ class emailer
$this->use_smtp = $use_smtp; $this->use_smtp = $use_smtp;
$this->tpl_file = NULL; $this->tpl_file = NULL;
$this->address = NULL; $this->address = NULL;
$this->msg = ""; $this->msg = '';
$this->mimeOut = ""; $this->mimeOut = '';
} }
// //
@ -47,11 +47,11 @@ class emailer
// //
function reset() function reset()
{ {
$this->tpl_file = ""; $this->tpl_file = '';
$this->address = ""; $this->address = '';
$this->msg = ""; $this->msg = '';
$this->memOut = ""; $this->memOut = '';
$this->vars = ""; $this->vars = '';
} }
// //
@ -59,13 +59,8 @@ class emailer
// //
function email_address($address) function email_address($address)
{ {
$success = true;
$this->address = ''; $this->address = '';
$this->address .= $address; $this->address .= $address;
return $success;
} }
// //
@ -84,30 +79,27 @@ class emailer
$this->extra_headers = $headers; $this->extra_headers = $headers;
} }
function use_template($template_file, $template_lang = "") function use_template($template_file, $template_lang = '')
{ {
global $board_config, $phpbb_root_path; global $board_config, $phpbb_root_path;
if( $template_lang == "" ) if ( $template_lang == '' )
{ {
$template_lang = $board_config['default_lang']; $template_lang = $board_config['default_lang'];
} }
$template_file = $phpbb_root_path . "language/lang_" . $template_lang . "/email/" . $template_file . ".tpl"; $this->tpl_file = $phpbb_root_path . 'language/lang_' . $template_lang . '/email/' . $template_file . '.tpl';
if( !file_exists($template_file) ) if ( !file_exists($this->tpl_file) )
{ {
message_die(GENERAL_ERROR, "Couldn't find template file: $template_file", "", __LINE__, __FILE__); message_die(GENERAL_ERROR, 'Could not find email template file ' . $template_file, '', __LINE__, __FILE__);
}
else
{
$this->tpl_file = $template_file;
if( !$this->load_msg() )
{
message_die(GENERAL_ERROR, "Couldn't load template file: $template_file", "", __LINE__, __FILE__);
}
} }
return TRUE; if ( !$this->load_msg() )
{
message_die(GENERAL_ERROR, 'Could not load email template file ' . $template_file, '', __LINE__, __FILE__);
}
return true;
} }
// //
@ -115,35 +107,25 @@ class emailer
// //
function load_msg() function load_msg()
{ {
if ($this->tpl_file == NULL) if ( $this->tpl_file == NULL )
{ {
message_die(GENERAL_ERROR, "No template file set", "", __LINE__, __FILE__); message_die(GENERAL_ERROR, 'No template file set', '', __LINE__, __FILE__);
} }
else
if ( !($fd = fopen($this->tpl_file, 'r')) )
{ {
if(!($fd = fopen($this->tpl_file, 'r'))) message_die(GENERAL_ERROR, 'Failed opening template file', '', __LINE__, __FILE__);
{
message_die(GENERAL_ERROR, "fopen failed opening template file", "", __LINE__, __FILE__);
}
else
{
$this->msg .= fread($fd, filesize($this->tpl_file));
fclose($fd);
}
} }
return TRUE;
$this->msg .= fread($fd, filesize($this->tpl_file));
fclose($fd);
return true;
} }
function assign_vars($vars) function assign_vars($vars)
{ {
if(empty($this->vars)) $this->vars = ( empty($this->vars) ) ? $vars : $this->vars . $vars;
{
$this->vars = $vars;
}
else
{
$this->vars .= $vars;
}
} }
function parse_email() function parse_email()
@ -165,12 +147,13 @@ class emailer
// do this here because the subject may contain a variable // do this here because the subject may contain a variable
// //
$match = array(); $match = array();
preg_match("/^(Subject:(.*?)[\r\n]+?)?(.*?)$/is", $this->msg, $match); preg_match("/^(Subject:(.*?)[\r\n]+?)?(Charset:(.*?)[\r\n]+?)?(.*?)$/is", $this->msg, $match);
$this->msg = ( isset($match[3]) ) ? trim($match[3]) : ''; $this->msg = ( isset($match[5]) ) ? trim($match[5]) : '';
$this->subject = ( $this->subject != '' ) ? $this->subject : trim($match[2]); $this->subject = ( $this->subject != '' ) ? $this->subject : trim($match[2]);
$this->encoding = ( trim($match[4]) != '' ) ? trim($match[4]) : 'iso-8859-1';
return TRUE; return true;
} }
// //
@ -178,57 +161,55 @@ class emailer
// //
function send() function send()
{ {
global $phpEx, $phpbb_root_dir; global $phpEx, $phpbb_root_path;
if (isset($phpbb_root_dir)) if ( $this->address == NULL )
{ {
// we must be in the admin section. message_die(GENERAL_ERROR, 'No email address set', '', __LINE__, __FILE__);
$phpbb_root_path = $phpbb_root_dir; }
if ( !$this->parse_email() )
{
return false;
}
//
// Add date and encoding type
//
$universal_extra = "MIME-Version: 1.0\nContent-type: text/plain; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . gmdate('D, d M Y H:i:s', time()) . " UT\n";
$this->extra_headers = $universal_extra . $this->extra_headers;
if ( $this->use_smtp )
{
if ( !defined('SMTP_INCLUDED') )
{
include($phpbb_root_path . 'includes/smtp.' . $phpEx);
}
$result = smtpmail($this->address, $this->subject, $this->msg, $this->extra_headers);
} }
else else
{ {
$phpbb_root_path = "./"; $result = @mail($this->address, $this->subject, $this->msg, $this->extra_headers);
} }
if ($this->address == NULL) if ( !$result )
{ {
message_die(GENERAL_ERROR, "No email address set", "", __LINE__, __FILE__); message_die(GENERAL_ERROR, 'Failed sending email', '', __LINE__, __FILE__);
}
else
{
if(!$this->parse_email())
{
return FALSE;
}
if($this->use_smtp)
{
if(!defined('SMTP_INCLUDED'))
{
include($phpbb_root_path . "includes/smtp.".$phpEx);
}
if(!smtpmail($this->address, $this->subject, $this->msg, $this->extra_headers))
{
message_die(GENERAL_ERROR, "Sending via SMTP failed", "", __LINE__, __FILE__);
}
}
else
{
@mail($this->address, $this->subject, $this->msg, $this->extra_headers);
}
} }
return TRUE; return true;
} }
// //
// Attach files via MIME. // Attach files via MIME.
// //
function attachFile($filename, $mimetype="application/octet-stream", $szFromAddress, $szFilenameToDisplay) function attachFile($filename, $mimetype = "application/octet-stream", $szFromAddress, $szFilenameToDisplay)
{ {
$mime_boundary = "--==================_846811060==_"; $mime_boundary = "--==================_846811060==_";
$this->mailMsg = "--".$mime_boundary."\nContent-Type: text/plain;\n\tcharset=\"iso-8859-1\"\n\n".$this->mailMsg; $this->mailMsg = '--' . $mime_boundary . "\nContent-Type: text/plain;\n\tcharset=\"iso-8859-1\"\n\n" . $this->mailMsg;
if ($mime_filename) if ($mime_filename)
{ {
@ -244,11 +225,11 @@ class emailer
$this->mimeOut .= "Content-Transfer-Encoding: quoted-printable\n"; $this->mimeOut .= "Content-Transfer-Encoding: quoted-printable\n";
$this->mimeOut .= "Content-Disposition: attachment;\n\tfilename=\"$szFilenameToDisplay\"\n\n"; $this->mimeOut .= "Content-Disposition: attachment;\n\tfilename=\"$szFilenameToDisplay\"\n\n";
if ($mimetype == "message/rfc822") if ( $mimetype == "message/rfc822" )
{ {
$this->mimeOut .= "From: ".$szFromAddress."\n"; $this->mimeOut .= "From: ".$szFromAddress."\n";
$this->mimeOut .= "To: ".$this->emailAddress."\n"; $this->mimeOut .= "To: ".$this->emailAddress."\n";
$this->mimeOut .= "Date: ".date("D, d M Y G:i:s ").$this->getTimeZoneInEmailFormat()."\n"; $this->mimeOut .= "Date: ".date("D, d M Y H:i:s") . " UT\n";
$this->mimeOut .= "Reply-To:".$szFromAddress."\n"; $this->mimeOut .= "Reply-To:".$szFromAddress."\n";
$this->mimeOut .= "Subject: ".$this->mailSubject."\n"; $this->mimeOut .= "Subject: ".$this->mailSubject."\n";
$this->mimeOut .= "X-Mailer: PHP/".phpversion()."\n"; $this->mimeOut .= "X-Mailer: PHP/".phpversion()."\n";

View file

@ -491,7 +491,7 @@ function obtain_word_list(&$orig_word, &$replacement_word)
// //
function message_die($msg_code, $msg_text = '', $msg_title = '', $err_line = '', $err_file = '', $sql = '') function message_die($msg_code, $msg_text = '', $msg_title = '', $err_line = '', $err_file = '', $sql = '')
{ {
global $db, $template, $board_config, $theme, $lang, $phpEx, $phpbb_root_path, $nav_links; global $db, $template, $board_config, $theme, $lang, $phpEx, $phpbb_root_path, $nav_links, $gen_simple_header;
global $userdata, $user_ip, $session_length; global $userdata, $user_ip, $session_length;
global $starttime; global $starttime;
@ -594,6 +594,7 @@ function message_die($msg_code, $msg_text = '', $msg_title = '', $err_line = '',
{ {
$msg_title = $lang['General_Error']; $msg_title = $lang['General_Error'];
} }
break;
case CRITICAL_ERROR: case CRITICAL_ERROR:
// //

View file

@ -55,7 +55,7 @@ function make_forum_select($box_name, $ignore_forum = false)
// //
// Synchronise functions for forums/topics // Synchronise functions for forums/topics
// //
function sync($type, $id) function sync($type, $id = false)
{ {
global $db; global $db;
@ -64,7 +64,7 @@ function sync($type, $id)
case 'all forums': case 'all forums':
$sql = "SELECT forum_id $sql = "SELECT forum_id
FROM " . FORUMS_TABLE; FROM " . FORUMS_TABLE;
if ( !$result = $db->sql_query($sql) ) if ( !($result = $db->sql_query($sql)) )
{ {
message_die(GENERAL_ERROR, 'Could not get forum IDs', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Could not get forum IDs', '', __LINE__, __FILE__, $sql);
} }
@ -78,7 +78,7 @@ function sync($type, $id)
case 'all topics': case 'all topics':
$sql = "SELECT topic_id $sql = "SELECT topic_id
FROM " . TOPICS_TABLE; FROM " . TOPICS_TABLE;
if ( !$result = $db->sql_query($sql) ) if ( !($result = $db->sql_query($sql)) )
{ {
message_die(GENERAL_ERROR, 'Could not get topic ID', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Could not get topic ID', '', __LINE__, __FILE__, $sql);
} }
@ -90,12 +90,10 @@ function sync($type, $id)
break; break;
case 'forum': case 'forum':
$sql = "SELECT MAX(p.post_id) AS last_post, COUNT(p.post_id) AS total $sql = "SELECT MAX(post_id) AS last_post, COUNT(post_id) AS total
FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t FROM " . POSTS_TABLE . "
WHERE p.forum_id = $id WHERE forum_id = $id";
AND t.topic_id = p.topic_id if ( !($result = $db->sql_query($sql)) )
AND t.topic_status <> " . TOPIC_MOVED;
if ( !$result = $db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, 'Could not get post ID', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Could not get post ID', '', __LINE__, __FILE__, $sql);
} }
@ -113,9 +111,8 @@ function sync($type, $id)
$sql = "SELECT COUNT(topic_id) AS total $sql = "SELECT COUNT(topic_id) AS total
FROM " . TOPICS_TABLE . " FROM " . TOPICS_TABLE . "
WHERE forum_id = $id WHERE forum_id = $id";
AND topic_status <> " . TOPIC_MOVED; if ( !($result = $db->sql_query($sql)) )
if ( !$result = $db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, 'Could not get topic count', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Could not get topic count', '', __LINE__, __FILE__, $sql);
} }
@ -135,22 +132,19 @@ function sync($type, $id)
$sql = "SELECT MAX(post_id) AS last_post, MIN(post_id) AS first_post, COUNT(post_id) AS total_posts $sql = "SELECT MAX(post_id) AS last_post, MIN(post_id) AS first_post, COUNT(post_id) AS total_posts
FROM " . POSTS_TABLE . " FROM " . POSTS_TABLE . "
WHERE topic_id = $id"; WHERE topic_id = $id";
if ( !$result = $db->sql_query($sql) ) if ( !($result = $db->sql_query($sql)) )
{ {
message_die(GENERAL_ERROR, 'Could not get post ID', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Could not get post ID', '', __LINE__, __FILE__, $sql);
} }
if ( $row = $db->sql_fetchrow($result) ) if ( $row = $db->sql_fetchrow($result) )
{ {
$sql = "UPDATE " . TOPICS_TABLE . " $sql = ( $row['total_posts'] ) ? "UPDATE " . TOPICS_TABLE . " SET topic_replies = " . ( $row['total_posts'] - 1 ) . ", topic_first_post_id = " . $row['first_post'] . ", topic_last_post_id = " . $row['last_post'] . " WHERE topic_id = $id" : "DELETE FROM " . TOPICS_TABLE . " WHERE topic_id = $id";
SET topic_replies = " . ( $row['total_posts'] - 1 ) . ", topic_first_post_id = " . $row['first_post'] . ", topic_last_post_id = " . $row['last_post'] . "
WHERE topic_id = $id";
if ( !$db->sql_query($sql) ) if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, 'Could not update topic', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Could not update topic', '', __LINE__, __FILE__, $sql);
} }
} }
break; break;
} }

View file

@ -22,7 +22,7 @@
if ( !defined('IN_PHPBB') ) if ( !defined('IN_PHPBB') )
{ {
die("Hacking attempt"); die('Hacking attempt');
} }
$html_entities_match = array('#&#', '#<#', '#>#'); $html_entities_match = array('#&#', '#<#', '#>#');
@ -108,23 +108,6 @@ function prepare_message($message, $html_on, $bbcode_on, $smile_on, $bbcode_uid
if( $bbcode_on && $bbcode_uid != '' ) if( $bbcode_on && $bbcode_uid != '' )
{ {
$tmp_message = $message;
if ( ($match_count = preg_match_all('#^(.*?)\[code\](.*?)\[\/code\](.*?)$#is', $tmp_message, $match)) )
{
$code_entities_match = array('#<#', '#>#', '#"#', '#:#', '#\[#', '#\]#', '#\(#', '#\)#', '#\{#', '#\}#');
$code_entities_replace = array('&lt;', '&gt;', '&quot;', '&#58;', '&#91;', '&#93;', '&#40;', '&#41;', '&#123;', '&#125;');
$message = '';
for($i = 0; $i < $match_count; $i++)
{
$message .= $match[1][$i] . '[code]' . preg_replace($code_entities_match, $code_entities_replace, $match[2][$i]) . '[/code]';
$tmp_message = $match[3][$i];
}
$message .= $tmp_message;
}
$message = bbencode_first_pass($message, $bbcode_uid); $message = bbencode_first_pass($message, $bbcode_uid);
} }
@ -249,7 +232,7 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
WHERE $where_sql"; WHERE $where_sql";
if ( $result = $db->sql_query($sql) ) if ( $result = $db->sql_query($sql) )
{ {
if( $row = $db->sql_fetchrow($result) ) if ( $row = $db->sql_fetchrow($result) )
{ {
if ( $row['last_post_time'] > 0 && ( $current_time - $row['last_post_time'] ) < $board_config['flood_interval'] ) if ( $row['last_post_time'] > 0 && ( $current_time - $row['last_post_time'] ) < $board_config['flood_interval'] )
{ {
@ -267,12 +250,12 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
{ {
$topic_vote = ( !empty($poll_title) && count($poll_options) >= 2 ) ? 1 : 0; $topic_vote = ( !empty($poll_title) && count($poll_options) >= 2 ) ? 1 : 0;
$sql = ( $mode != "editpost" ) ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type, topic_vote = $topic_vote WHERE topic_id = $topic_id"; $sql = ( $mode != "editpost" ) ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type, topic_vote = $topic_vote WHERE topic_id = $topic_id";
if ( !($result = $db->sql_query($sql)) ) if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
} }
if( $mode == 'newtopic' ) if ( $mode == 'newtopic' )
{ {
$topic_id = $db->sql_nextid(); $topic_id = $db->sql_nextid();
} }
@ -280,18 +263,18 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
$edited_sql = ( $mode == 'editpost' && !$post_data['last_post'] && $post_data['poster_post'] ) ? ", post_edit_time = $current_time, post_edit_count = post_edit_count + 1 " : ""; $edited_sql = ( $mode == 'editpost' && !$post_data['last_post'] && $post_data['poster_post'] ) ? ", post_edit_time = $current_time, post_edit_count = post_edit_count + 1 " : "";
$sql = ( $mode != "editpost" ) ? "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig) VALUES ($topic_id, $forum_id, " . $userdata['user_id'] . ", '$post_username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $attach_sig)" : "UPDATE " . POSTS_TABLE . " SET enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig" . $edited_sql . " WHERE post_id = $post_id"; $sql = ( $mode != "editpost" ) ? "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig) VALUES ($topic_id, $forum_id, " . $userdata['user_id'] . ", '$post_username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $attach_sig)" : "UPDATE " . POSTS_TABLE . " SET enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig" . $edited_sql . " WHERE post_id = $post_id";
if ( !($result = $db->sql_query($sql, BEGIN_TRANSACTION)) ) if ( !$db->sql_query($sql, BEGIN_TRANSACTION) )
{ {
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
} }
if( $mode != 'editpost' ) if ( $mode != 'editpost' )
{ {
$post_id = $db->sql_nextid(); $post_id = $db->sql_nextid();
} }
$sql = ( $mode != 'editpost' ) ? "INSERT INTO " . POSTS_TEXT_TABLE . " (post_id, post_subject, bbcode_uid, post_text) VALUES ($post_id, '$post_subject', '$bbcode_uid', '$post_message')" : "UPDATE " . POSTS_TEXT_TABLE . " SET post_text = '$post_message', bbcode_uid = '$bbcode_uid', post_subject = '$post_subject' WHERE post_id = $post_id"; $sql = ( $mode != 'editpost' ) ? "INSERT INTO " . POSTS_TEXT_TABLE . " (post_id, post_subject, bbcode_uid, post_text) VALUES ($post_id, '$post_subject', '$bbcode_uid', '$post_message')" : "UPDATE " . POSTS_TEXT_TABLE . " SET post_text = '$post_message', bbcode_uid = '$bbcode_uid', post_subject = '$post_subject' WHERE post_id = $post_id";
if ( !($result = $db->sql_query($sql)) ) if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
} }
@ -304,7 +287,7 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
if ( ( $mode == 'newtopic' || $mode == 'editpost' ) && !empty($poll_title) && count($poll_options) >= 2 ) if ( ( $mode == 'newtopic' || $mode == 'editpost' ) && !empty($poll_title) && count($poll_options) >= 2 )
{ {
$sql = ( !$post_data['has_poll'] ) ? "INSERT INTO " . VOTE_DESC_TABLE . " (topic_id, vote_text, vote_start, vote_length) VALUES ($topic_id, '$poll_title', $current_time, " . ( $poll_length * 86400 ) . ")" : "UPDATE " . VOTE_DESC_TABLE . " SET vote_text = '$poll_title', vote_length = " . ( $poll_length * 86400 ) . " WHERE topic_id = $topic_id"; $sql = ( !$post_data['has_poll'] ) ? "INSERT INTO " . VOTE_DESC_TABLE . " (topic_id, vote_text, vote_start, vote_length) VALUES ($topic_id, '$poll_title', $current_time, " . ( $poll_length * 86400 ) . ")" : "UPDATE " . VOTE_DESC_TABLE . " SET vote_text = '$poll_title', vote_length = " . ( $poll_length * 86400 ) . " WHERE topic_id = $topic_id";
if ( !($result = $db->sql_query($sql)) ) if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
} }
@ -326,7 +309,7 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
{ {
$old_poll_result[$row['vote_option_id']] = $row['vote_result']; $old_poll_result[$row['vote_option_id']] = $row['vote_result'];
if( !isset($poll_options[$row['vote_option_id']]) ) if ( !isset($poll_options[$row['vote_option_id']]) )
{ {
$delete_option_sql .= ( $delete_option_sql != '' ) ? ', ' . $row['vote_option_id'] : $row['vote_option_id']; $delete_option_sql .= ( $delete_option_sql != '' ) ? ', ' . $row['vote_option_id'] : $row['vote_option_id'];
} }
@ -342,13 +325,13 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
$poll_option_id = 1; $poll_option_id = 1;
while ( list($option_id, $option_text) = each($poll_options) ) while ( list($option_id, $option_text) = each($poll_options) )
{ {
if( !empty($option_text) ) if ( !empty($option_text) )
{ {
$option_text = str_replace("\'", "''", $option_text); $option_text = str_replace("\'", "''", $option_text);
$poll_result = ( $mode == "editpost" && isset($old_poll_result[$option_id]) ) ? $old_poll_result[$option_id] : 0; $poll_result = ( $mode == "editpost" && isset($old_poll_result[$option_id]) ) ? $old_poll_result[$option_id] : 0;
$sql = ( $mode != "editpost" || !isset($old_poll_result[$option_id]) ) ? "INSERT INTO " . VOTE_RESULTS_TABLE . " (vote_id, vote_option_id, vote_option_text, vote_result) VALUES ($poll_id, $poll_option_id, '$option_text', $poll_result)" : "UPDATE " . VOTE_RESULTS_TABLE . " SET vote_option_text = '$option_text', vote_result = $poll_result WHERE vote_option_id = $option_id AND vote_id = $poll_id"; $sql = ( $mode != "editpost" || !isset($old_poll_result[$option_id]) ) ? "INSERT INTO " . VOTE_RESULTS_TABLE . " (vote_id, vote_option_id, vote_option_text, vote_result) VALUES ($poll_id, $poll_option_id, '$option_text', $poll_result)" : "UPDATE " . VOTE_RESULTS_TABLE . " SET vote_option_text = '$option_text', vote_result = $poll_result WHERE vote_option_id = $option_id AND vote_id = $poll_id";
if ( !($result = $db->sql_query($sql)) ) if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
} }
@ -356,11 +339,12 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
} }
} }
if( $delete_option_sql != '' ) if ( $delete_option_sql != '' )
{ {
$sql = "DELETE FROM " . VOTE_RESULTS_TABLE . " $sql = "DELETE FROM " . VOTE_RESULTS_TABLE . "
WHERE vote_option_id IN ($delete_option_sql)"; WHERE vote_option_id IN ($delete_option_sql)
if ( !($result = $db->sql_query($sql)) ) AND vote_id = $poll_id";
if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, 'Error deleting pruned poll options', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Error deleting pruned poll options', '', __LINE__, __FILE__, $sql);
} }
@ -380,7 +364,7 @@ function update_post_stats(&$mode, &$post_data, &$forum_id, &$topic_id, &$post_i
{ {
global $db; global $db;
$sign = ( $mode == 'delete' ) ? "- 1" : "+ 1"; $sign = ( $mode == 'delete' ) ? '- 1' : '+ 1';
$forum_update_sql = "forum_posts = forum_posts $sign"; $forum_update_sql = "forum_posts = forum_posts $sign";
$topic_update_sql = ''; $topic_update_sql = '';
@ -395,53 +379,57 @@ function update_post_stats(&$mode, &$post_data, &$forum_id, &$topic_id, &$post_i
else else
{ {
$topic_update_sql = "topic_replies = topic_replies - 1"; $topic_update_sql .= 'topic_replies = topic_replies - 1';
$sql = "SELECT MAX(post_id) AS post_id $sql = "SELECT MAX(post_id) AS last_post_id
FROM " . POSTS_TABLE . " FROM " . POSTS_TABLE . "
WHERE topic_id = $topic_id"; WHERE topic_id = $topic_id";
if ( !($db->sql_query($sql)) ) if ( !($result = $db->sql_query($sql)) )
{ {
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
} }
if ( $row = $db->sql_fetchrow($result) ) if ( $row = $db->sql_fetchrow($result) )
{ {
$topic_update_sql .= ', topic_last_post_id = ' . $row['post_id']; $topic_update_sql .= ', topic_last_post_id = ' . $row['last_post_id'];
} }
} }
if ( $post_data['last_topic'] ) if ( $post_data['last_topic'] )
{ {
$sql = "SELECT MAX(post_id) AS post_id $sql = "SELECT MAX(post_id) AS last_post_id
FROM " . POSTS_TABLE . " FROM " . POSTS_TABLE . "
WHERE forum_id = $forum_id"; WHERE forum_id = $forum_id";
if ( !($db->sql_query($sql)) ) if ( !($result = $db->sql_query($sql)) )
{ {
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
} }
if ( $row = $db->sql_fetchrow($result) ) if ( $row = $db->sql_fetchrow($result) )
{ {
$forum_update_sql .= ( $row['post_id'] ) ? ', forum_last_post_id = ' . $row['post_id'] : ', forum_last_post_id = 0'; $forum_update_sql .= ( $row['last_post_id'] ) ? ', forum_last_post_id = ' . $row['last_post_id'] : ', forum_last_post_id = 0';
} }
} }
} }
else if ( $post_data['first_post'] ) else if ( $post_data['first_post'] )
{ {
$sql = "SELECT MIN(post_id) AS post_id $sql = "SELECT MIN(post_id) AS first_post_id
FROM " . POSTS_TABLE . " FROM " . POSTS_TABLE . "
WHERE topic_id = $topic_id"; WHERE topic_id = $topic_id";
if ( !($db->sql_query($sql)) ) if ( !($result = $db->sql_query($sql)) )
{ {
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
} }
if ( $row = $db->sql_fetchrow($result) ) if ( $row = $db->sql_fetchrow($result) )
{ {
$topic_update_sql = 'topic_replies = topic_replies - 1, topic_first_post_id = ' . $row['post_id']; $topic_update_sql .= 'topic_replies = topic_replies - 1, topic_first_post_id = ' . $row['first_post_id'];
} }
} }
else
{
$topic_update_sql .= 'topic_replies = topic_replies - 1';
}
} }
else if ( $mode != 'poll_delete' ) else if ( $mode != 'poll_delete' )
{ {
@ -456,7 +444,7 @@ function update_post_stats(&$mode, &$post_data, &$forum_id, &$topic_id, &$post_i
$sql = "UPDATE " . FORUMS_TABLE . " SET $sql = "UPDATE " . FORUMS_TABLE . " SET
$forum_update_sql $forum_update_sql
WHERE forum_id = $forum_id"; WHERE forum_id = $forum_id";
if ( !($result = $db->sql_query($sql)) ) if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
} }
@ -465,8 +453,9 @@ function update_post_stats(&$mode, &$post_data, &$forum_id, &$topic_id, &$post_i
{ {
$sql = "UPDATE " . TOPICS_TABLE . " SET $sql = "UPDATE " . TOPICS_TABLE . " SET
$topic_update_sql $topic_update_sql
WHERE topic_id = $topic_id"; WHERE topic_id = $topic_id
if ( !($result = $db->sql_query($sql)) ) OR topic_moved_id = $topic_id";
if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
} }
@ -477,7 +466,7 @@ function update_post_stats(&$mode, &$post_data, &$forum_id, &$topic_id, &$post_i
$sql = "UPDATE " . USERS_TABLE . " $sql = "UPDATE " . USERS_TABLE . "
SET user_posts = user_posts $sign SET user_posts = user_posts $sign
WHERE user_id = $user_id"; WHERE user_id = $user_id";
if ( !($result = $db->sql_query($sql, END_TRANSACTION)) ) if ( !$db->sql_query($sql, END_TRANSACTION) )
{ {
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
} }
@ -496,89 +485,80 @@ function delete_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
include($phpbb_root_path . 'includes/functions_search.'.$phpEx); include($phpbb_root_path . 'includes/functions_search.'.$phpEx);
$topic_update_sql = '';
if ( $mode != 'poll_delete' ) if ( $mode != 'poll_delete' )
{ {
$sql = "DELETE FROM " . POSTS_TABLE . " $sql = "DELETE FROM " . POSTS_TABLE . "
WHERE post_id = $post_id"; WHERE post_id = $post_id";
if ( !($db->sql_query($sql)) ) if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
} }
$sql = "DELETE FROM " . POSTS_TEXT_TABLE . " $sql = "DELETE FROM " . POSTS_TEXT_TABLE . "
WHERE post_id = $post_id"; WHERE post_id = $post_id";
if ( !($db->sql_query($sql)) ) if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
} }
$sql = "DELETE FROM " . SEARCH_MATCH_TABLE . "
WHERE post_id = $post_id";
if ( !($db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
}
$forum_update_sql = 'forum_posts = forum_posts - 1';
$topic_update_sql .= 'topic_replies = topic_replies - 1';
if ( $post_data['last_post'] ) if ( $post_data['last_post'] )
{ {
if ( $post_data['first_post'] ) if ( $post_data['first_post'] )
{ {
$forum_update_sql .= ', forum_topics = forum_topics - 1';
$sql = "DELETE FROM " . TOPICS_TABLE . " $sql = "DELETE FROM " . TOPICS_TABLE . "
WHERE topic_id = $topic_id WHERE topic_id = $topic_id
OR topic_moved_id = $topic_id"; OR topic_moved_id = $topic_id";
if ( !($db->sql_query($sql)) ) if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
} }
$sql = "DELETE FROM " . TOPICS_WATCH_TABLE . " $sql = "DELETE FROM " . TOPICS_WATCH_TABLE . "
WHERE topic_id = $topic_id"; WHERE topic_id = $topic_id";
if ( !($db->sql_query($sql)) ) if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
} }
} }
} }
remove_search_post($post_id);
} }
if( $mode == 'poll_delete' || ( $mode == 'delete' && $post_data['first_post'] && $post_data['last_post'] ) && $post_data['has_poll'] && $post_data['edit_poll'] ) if ( $mode == 'poll_delete' || ( $mode == 'delete' && $post_data['first_post'] && $post_data['last_post'] ) && $post_data['has_poll'] && $post_data['edit_poll'] )
{ {
$sql = "DELETE FROM " . VOTE_DESC_TABLE . " $sql = "DELETE FROM " . VOTE_DESC_TABLE . "
WHERE vote_id = $poll_id"; WHERE topic_id = $topic_id";
if ( !($db->sql_query($sql)) ) if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql);
} }
$sql = "DELETE FROM " . VOTE_RESULTS_TABLE . " $sql = "DELETE FROM " . VOTE_RESULTS_TABLE . "
WHERE vote_id = $poll_id"; WHERE vote_id = $poll_id";
if ( !($db->sql_query($sql)) ) if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql);
} }
$sql = "DELETE FROM " . VOTE_USERS_TABLE . " $sql = "DELETE FROM " . VOTE_USERS_TABLE . "
WHERE vote_id = $poll_id"; WHERE vote_id = $poll_id";
if ( !($db->sql_query($sql)) ) if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql);
} }
} }
remove_search_post($post_id);
if ( $mode == 'delete' && $post_data['first_post'] && $post_data['last_post'] ) if ( $mode == 'delete' && $post_data['first_post'] && $post_data['last_post'] )
{ {
$meta = '<meta http-equiv="refresh" content="3;url=' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_id) . '">'; $meta = '<meta http-equiv="refresh" content="3;url=' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . '=' . $forum_id) . '">';
$message = $lang['Deleted']; $message = $lang['Deleted'];
} }
else else
{ {
$meta = '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=" . $topic_id) . '">'; $meta = '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $topic_id) . '">';
$message = ( ( $mode == "poll_delete" ) ? $lang['Poll_delete'] : $lang['Deleted'] ) . '<br /><br />' . sprintf($lang['Click_return_topic'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . '">', '</a>'); $message = ( ( $mode == 'poll_delete' ) ? $lang['Poll_delete'] : $lang['Deleted'] ) . '<br /><br />' . sprintf($lang['Click_return_topic'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . '">', '</a>');
} }
$message .= '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>'); $message .= '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>');
@ -598,9 +578,9 @@ function user_notification($mode, &$post_data, &$forum_id, &$topic_id, &$post_id
if ( $mode == 'delete' ) if ( $mode == 'delete' )
{ {
$delete_sql = ( !$post_data['first_post'] && !$post_data['last_post'] ) ? " AND user_id = " . $userdata['user_id'] : ""; $delete_sql = ( !$post_data['first_post'] && !$post_data['last_post'] ) ? " AND user_id = " . $userdata['user_id'] : '';
$sql = "DELETE FROM " . TOPICS_WATCH_TABLE . " WHERE topic_id = $topic_id" . $delete_sql; $sql = "DELETE FROM " . TOPICS_WATCH_TABLE . " WHERE topic_id = $topic_id" . $delete_sql;
if ( !($result = $db->sql_query($sql)) ) if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, 'Could not change topic notify data', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Could not change topic notify data', '', __LINE__, __FILE__, $sql);
} }
@ -650,7 +630,7 @@ function user_notification($mode, &$post_data, &$forum_id, &$topic_id, &$post_id
$server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://'; $server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://';
$server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/'; $server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/';
$email_headers = "From: " . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\r\n"; $email_headers = 'From: ' . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\n";
$update_watched_sql = ''; $update_watched_sql = '';
if ( $row = $db->sql_fetchrow($result) ) if ( $row = $db->sql_fetchrow($result) )
@ -663,7 +643,7 @@ function user_notification($mode, &$post_data, &$forum_id, &$topic_id, &$post_id
{ {
$emailer->use_template('topic_notify', $row['user_lang']); $emailer->use_template('topic_notify', $row['user_lang']);
$emailer->email_address($row['user_email']); $emailer->email_address($row['user_email']);
$emailer->set_subject();//$lang['Topic_reply_notification'] $emailer->set_subject();
$emailer->extra_headers($email_headers); $emailer->extra_headers($email_headers);
$emailer->assign_vars(array( $emailer->assign_vars(array(
@ -711,7 +691,7 @@ function user_notification($mode, &$post_data, &$forum_id, &$topic_id, &$post_id
$sql = "DELETE FROM " . TOPICS_WATCH_TABLE . " $sql = "DELETE FROM " . TOPICS_WATCH_TABLE . "
WHERE topic_id = $topic_id WHERE topic_id = $topic_id
AND user_id = " . $userdata['user_id']; AND user_id = " . $userdata['user_id'];
if ( !$result = $db->sql_query($sql) ) if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, 'Could not delete topic watch information', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Could not delete topic watch information', '', __LINE__, __FILE__, $sql);
} }
@ -720,7 +700,7 @@ function user_notification($mode, &$post_data, &$forum_id, &$topic_id, &$post_id
{ {
$sql = "INSERT INTO " . TOPICS_WATCH_TABLE . " (user_id, topic_id, notify_status) $sql = "INSERT INTO " . TOPICS_WATCH_TABLE . " (user_id, topic_id, notify_status)
VALUES (" . $userdata['user_id'] . ", $topic_id, 0)"; VALUES (" . $userdata['user_id'] . ", $topic_id, 0)";
if ( !($result = $db->sql_query($sql)) ) if ( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, 'Could not insert topic watch information', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Could not insert topic watch information', '', __LINE__, __FILE__, $sql);
} }

View file

@ -21,9 +21,8 @@
function clean_words($mode, &$entry, &$stopword_list, &$synonym_list) function clean_words($mode, &$entry, &$stopword_list, &$synonym_list)
{ {
// Weird, $init_match doesn't work with static when double quotes (") are used...
static $drop_char_match = array('^', '$', '&', '(', ')', '<', '>', '`', '\'', '"', '|', ',', '@', '_', '?', '%', '-', '~', '+', '.', '[', ']', '{', '}', ':', '\\', '/', '=', '#', '\'', ';', '!'); static $drop_char_match = array('^', '$', '&', '(', ')', '<', '>', '`', '\'', '"', '|', ',', '@', '_', '?', '%', '-', '~', '+', '.', '[', ']', '{', '}', ':', '\\', '/', '=', '#', '\'', ';', '!');
static $drop_char_replace = array(' ', ' ', ' ', ' ', ' ', ' ', ' ', '', '', ' ', ' ', ' ', ' ', '', ' ', ' ', '', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' , ' ', ' ', ' ', ' ', ' ', ' '); static $drop_char_replace = array(' ', ' ', ' ', ' ', ' ', ' ', ' ', '', '', ' ', ' ', ' ', ' ', '', ' ', ' ', '', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' , ' ', ' ', ' ', ' ', ' ', ' ');
$entry = ' ' . strip_tags(strtolower($entry)) . ' '; $entry = ' ' . strip_tags(strtolower($entry)) . ' ';
@ -42,13 +41,10 @@ function clean_words($mode, &$entry, &$stopword_list, &$synonym_list)
} }
else if ( $mode == 'search' ) else if ( $mode == 'search' )
{ {
$entry = str_replace('+', ' and ', $entry); $entry = str_replace(' +', ' and ', $entry);
$entry = str_replace('-', ' not ', $entry); $entry = str_replace(' -', ' not ', $entry);
} }
// Replace numbers on their own
$entry = preg_replace('/\b[0-9]+\b/', ' ', $entry);
// //
// Filter out strange characters like ^, $, &, change "it's" to "its" // Filter out strange characters like ^, $, &, change "it's" to "its"
// //
@ -61,8 +57,8 @@ function clean_words($mode, &$entry, &$stopword_list, &$synonym_list)
{ {
$entry = str_replace('*', ' ', $entry); $entry = str_replace('*', ' ', $entry);
// 'words' that consist of <=3 or >=25 characters are removed. // 'words' that consist of <3 or >20 characters are removed.
$entry = preg_replace('/\b([a-z0-9]{1,3}|[a-z0-9]{20,})\b/',' ', $entry); $entry = preg_replace('/\b([a-z0-9]{1,2}|[a-z0-9]{21,})\b/',' ', $entry);
} }
if ( !empty($stopword_list) ) if ( !empty($stopword_list) )
@ -95,14 +91,8 @@ function clean_words($mode, &$entry, &$stopword_list, &$synonym_list)
function split_words(&$entry, $mode = 'post') function split_words(&$entry, $mode = 'post')
{ {
if ( $mode == 'post' ) $rex = ( $mode == 'post' ) ? "/\b(\w[\w']*\w+|\w+?)\b/" : '/(\*?[à-ÿa-z0-9]+\*?)|\b([à-ÿa-z0-9]+)\b/';
{ preg_match_all($rex, $entry, $split_entries);
preg_match_all("/\b(\w[\w']*\w+|\w+?)\b/", $entry, $split_entries);
}
else
{
preg_match_all('/(\*?[a-z0-9]+\*?)|\b([a-z0-9]+)\b/', $entry, $split_entries);
}
return $split_entries[1]; return $split_entries[1];
} }
@ -198,14 +188,14 @@ function add_search_words($post_id, $post_text, $post_title = '')
{ {
case 'mysql': case 'mysql':
case 'mysql4': case 'mysql4':
$value_sql .= ( ( $value_sql != '' ) ? ', ' : '' ) . '(\'' . $word[$i] . '\')'; $value_sql .= ( ( $value_sql != '' ) ? ', ' : '' ) . '(\'' . $word[$i] . '\', 0)';
break; break;
case 'mssql': case 'mssql':
$value_sql .= ( ( $value_sql != '' ) ? ' UNION ALL ' : '' ) . "SELECT '" . $word[$i] . "'"; $value_sql .= ( ( $value_sql != '' ) ? ' UNION ALL ' : '' ) . "SELECT '" . $word[$i] . "', 0";
break; break;
default: default:
$sql = "INSERT INTO " . SEARCH_WORD_TABLE . " (word_text) $sql = "INSERT INTO " . SEARCH_WORD_TABLE . " (word_text, word_common)
VALUES ('" . $word[$i] . "')"; VALUES ('" . $word[$i] . "', 0)";
if( !$db->sql_query($sql) ) if( !$db->sql_query($sql) )
{ {
message_die(GENERAL_ERROR, 'Could not insert new word', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Could not insert new word', '', __LINE__, __FILE__, $sql);
@ -221,11 +211,11 @@ function add_search_words($post_id, $post_text, $post_title = '')
{ {
case 'mysql': case 'mysql':
case 'mysql4': case 'mysql4':
$sql = "INSERT IGNORE INTO " . SEARCH_WORD_TABLE . " (word_text) $sql = "INSERT IGNORE INTO " . SEARCH_WORD_TABLE . " (word_text, word_common)
VALUES $value_sql"; VALUES $value_sql";
break; break;
case 'mssql': case 'mssql':
$sql = "INSERT INTO " . SEARCH_WORD_TABLE . " (word_text) $sql = "INSERT INTO " . SEARCH_WORD_TABLE . " (word_text, word_common)
$value_sql"; $value_sql";
break; break;
} }
@ -428,7 +418,9 @@ function remove_search_post($post_id_sql)
function username_search($search_match) function username_search($search_match)
{ {
global $db, $board_config, $template, $lang, $images, $theme, $phpEx, $phpbb_root_path; global $db, $board_config, $template, $lang, $images, $theme, $phpEx, $phpbb_root_path;
global $starttime; global $starttime, $gen_simple_header;
$gen_simple_header = TRUE;
$username_list = ''; $username_list = '';
if ( !empty($search_match) ) if ( !empty($search_match) )
@ -459,7 +451,6 @@ function username_search($search_match)
$db->sql_freeresult($result); $db->sql_freeresult($result);
} }
$gen_simple_header = TRUE;
$page_title = $lang['Search']; $page_title = $lang['Search'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx); include($phpbb_root_path . 'includes/page_header.'.$phpEx);

View file

@ -63,7 +63,7 @@ function validate_username($username)
{ {
while( $row = $db->sql_fetchrow($result) ) while( $row = $db->sql_fetchrow($result) )
{ {
if ( preg_match("#\b(" . str_replace("\*", "\w*?", preg_quote($row['disallow_username'])) . ")\b#i", $username) ) if ( preg_match("#\b(" . str_replace("\*", ".*?", preg_quote($row['disallow_username'])) . ")\b#i", $username) )
{ {
return array('error' => true, 'error_msg' => $lang['Username_disallowed']); return array('error' => true, 'error_msg' => $lang['Username_disallowed']);
} }
@ -76,7 +76,7 @@ function validate_username($username)
{ {
while( $row = $db->sql_fetchrow($result) ) while( $row = $db->sql_fetchrow($result) )
{ {
if ( preg_match("#\b(" . str_replace("\*", "\w*?", preg_quote($row['word'])) . ")\b#i", $username) ) if ( preg_match("#\b(" . str_replace("\*", ".*?", preg_quote($row['word'])) . ")\b#i", $username) )
{ {
return array('error' => true, 'error_msg' => $lang['Username_disallowed']); return array('error' => true, 'error_msg' => $lang['Username_disallowed']);
} }
@ -102,7 +102,7 @@ function validate_email($email)
if ( $email != '' ) if ( $email != '' )
{ {
if ( preg_match('/^[a-z0-9\.\-_]+@[a-z0-9\-_]+\.([a-z0-9\-_]+\.)*?[a-z]+$/is', $email) ) if ( preg_match('/^[a-z0-9\.\-_\+]+@[a-z0-9\-_]+\.([a-z0-9\-_]+\.)*?[a-z]+$/is', $email) )
{ {
$sql = "SELECT ban_email $sql = "SELECT ban_email
FROM " . BANLIST_TABLE; FROM " . BANLIST_TABLE;
@ -110,7 +110,7 @@ function validate_email($email)
{ {
while( $row = $db->sql_fetchrow($result) ) while( $row = $db->sql_fetchrow($result) )
{ {
$match_email = str_replace('*', '.*', $row['ban_email']); $match_email = str_replace('*', '.*?', $row['ban_email']);
if ( preg_match('/^' . $match_email . '$/is', $email) ) if ( preg_match('/^' . $match_email . '$/is', $email) )
{ {
return array('error' => true, 'error_msg' => $lang['Email_banned']); return array('error' => true, 'error_msg' => $lang['Email_banned']);

View file

@ -35,7 +35,7 @@ if ( $board_config['gzip_compress'] )
{ {
$phpver = phpversion(); $phpver = phpversion();
if ( $phpver >= '4.0.4pl1' ) if ( $phpver >= '4.0.4pl1' && strstr($HTTP_USER_AGENT,'compatible') )
{ {
if ( extension_loaded('zlib') ) if ( extension_loaded('zlib') )
{ {
@ -85,13 +85,11 @@ $s_last_visit = ( $userdata['session_logged_in'] ) ? create_date($board_config['
// Get basic (usernames + totals) online // Get basic (usernames + totals) online
// situation // situation
// //
$user_forum_sql = ( !empty($forum_id) ) ? "AND ( u.user_session_page = $forum_id $user_forum_sql = ( !empty($forum_id) ) ? "AND s.session_page = $forum_id" : '';
OR s.session_page = $forum_id)" : '';
$sql = "SELECT u.username, u.user_id, u.user_allow_viewonline, u.user_level, s.session_logged_in, s.session_ip $sql = "SELECT u.username, u.user_id, u.user_allow_viewonline, u.user_level, s.session_logged_in, s.session_ip
FROM ".USERS_TABLE." u, ".SESSIONS_TABLE." s FROM ".USERS_TABLE." u, ".SESSIONS_TABLE." s
WHERE u.user_id = s.session_user_id WHERE u.user_id = s.session_user_id
AND ( s.session_time >= ".( time() - 300 ) . " AND s.session_time >= ".( time() - 300 ) . "
OR u.user_session_time >= " . ( time() - 300 ) . " )
$user_forum_sql $user_forum_sql
ORDER BY u.username ASC, s.session_ip ASC"; ORDER BY u.username ASC, s.session_ip ASC";
if( !($result = $db->sql_query($sql)) ) if( !($result = $db->sql_query($sql)) )
@ -386,7 +384,7 @@ $template->assign_vars(array(
'S_CONTENT_ENCODING' => $lang['ENCODING'], 'S_CONTENT_ENCODING' => $lang['ENCODING'],
'S_CONTENT_DIR_LEFT' => $lang['LEFT'], 'S_CONTENT_DIR_LEFT' => $lang['LEFT'],
'S_CONTENT_DIR_RIGHT' => $lang['RIGHT'], 'S_CONTENT_DIR_RIGHT' => $lang['RIGHT'],
'S_TIMEZONE' => sprintf($lang['All_times'], $lang[$board_config['board_timezone']]), 'S_TIMEZONE' => sprintf($lang['All_times'], $lang[number_format($board_config['board_timezone'])]),
'S_LOGIN_ACTION' => append_sid('login.'.$phpEx), 'S_LOGIN_ACTION' => append_sid('login.'.$phpEx),
'T_HEAD_STYLESHEET' => $theme['head_stylesheet'], 'T_HEAD_STYLESHEET' => $theme['head_stylesheet'],
@ -454,4 +452,4 @@ header ('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
$template->pparse('overall_header'); $template->pparse('overall_header');
?> ?>

View file

@ -64,7 +64,7 @@ if ( $do_gzip_compress )
$gzip_contents = gzcompress($gzip_contents, 9); $gzip_contents = gzcompress($gzip_contents, 9);
$gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4); $gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);
echo '\x1f\x8b\x08\x00\x00\x00\x00\x00'; echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
echo $gzip_contents; echo $gzip_contents;
echo pack('V', $gzip_crc); echo pack('V', $gzip_crc);
echo pack('V', $gzip_size); echo pack('V', $gzip_size);

View file

@ -20,8 +20,6 @@
* *
***************************************************************************/ ***************************************************************************/
//
// session_begin()
// //
// Adds/updates a new session to the database for the given userid. // Adds/updates a new session to the database for the given userid.
// Returns the new session ID on success. // Returns the new session ID on success.
@ -54,8 +52,7 @@ function session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_a
$expiry_time = $current_time - $board_config['session_length']; $expiry_time = $current_time - $board_config['session_length'];
// //
// Try and pull the last time stored // Try and pull the last time stored in a cookie, if it exists
// in a cookie, if it exists
// //
$sql = "SELECT * $sql = "SELECT *
FROM " . USERS_TABLE . " FROM " . USERS_TABLE . "
@ -81,8 +78,6 @@ function session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_a
// autologinid matches password // autologinid matches password
$login = 1; $login = 1;
$enable_autologin = 1; $enable_autologin = 1;
$last_visit = ( $userdata['user_session_time'] > 0 ) ? $userdata['user_session_time'] : $current_time;
} }
else else
{ {
@ -102,7 +97,6 @@ function session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_a
} }
else else
{ {
$last_visit = ( $userdata['user_session_time'] > 0 ) ? $userdata['user_session_time'] : $current_time;
$login = 1; $login = 1;
} }
} }
@ -146,27 +140,29 @@ function session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_a
SET session_user_id = $user_id, session_start = $current_time, session_time = $current_time, session_page = $page_id, session_logged_in = $login SET session_user_id = $user_id, session_start = $current_time, session_time = $current_time, session_page = $page_id, session_logged_in = $login
WHERE session_id = '" . $session_id . "' WHERE session_id = '" . $session_id . "'
AND session_ip = '$user_ip'"; AND session_ip = '$user_ip'";
if ( !($result = $db->sql_query($sql)) || !$db->sql_affectedrows() ) if ( !$db->sql_query($sql) || !$db->sql_affectedrows() )
{ {
$session_id = md5(uniqid($user_ip)); $session_id = md5(uniqid($user_ip));
$sql = "INSERT INTO " . SESSIONS_TABLE . " $sql = "INSERT INTO " . SESSIONS_TABLE . "
(session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in) (session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in)
VALUES ('$session_id', $user_id, $current_time, $current_time, '$user_ip', $page_id, $login)"; VALUES ('$session_id', $user_id, $current_time, $current_time, '$user_ip', $page_id, $login)";
if ( !($result = $db->sql_query($sql)) ) if ( !$db->sql_query($sql) )
{ {
message_die(CRITICAL_ERROR, 'Error creating new session : session_begin', '', __LINE__, __FILE__, $sql); message_die(CRITICAL_ERROR, 'Error creating new session', '', __LINE__, __FILE__, $sql);
} }
} }
if ( $user_id != ANONYMOUS ) if ( $user_id != ANONYMOUS )
{ {// ( $userdata['user_session_time'] > $expiry_time && $auto_create ) ? $userdata['user_lastvisit'] : (
$last_visit = ( $userdata['user_session_time'] > 0 ) ? $userdata['user_session_time'] : $current_time;
$sql = "UPDATE " . USERS_TABLE . " $sql = "UPDATE " . USERS_TABLE . "
SET user_session_time = $current_time, user_session_page = $page_id, user_lastvisit = $last_visit SET user_session_time = $current_time, user_session_page = $page_id, user_lastvisit = $last_visit
WHERE user_id = $user_id"; WHERE user_id = $user_id";
if ( !$db->sql_query($sql) ) if ( !$db->sql_query($sql) )
{ {
message_die(CRITICAL_ERROR, 'Error updating last visit time : session_begin', '', __LINE__, __FILE__, $sql); message_die(CRITICAL_ERROR, 'Error updating last visit time', '', __LINE__, __FILE__, $sql);
} }
$userdata['user_lastvisit'] = $last_visit; $userdata['user_lastvisit'] = $last_visit;
@ -185,8 +181,6 @@ function session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_a
setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure); setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);
setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure); setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);
// header('Set-cookie: ' . $cookiename . '_data=' . urlencode(serialize($sessiondata)) . '; expires=' . gmdate("l, d-M-Y H:i:s", $current_time + 31536000) . ' GMT; domain=' . $cookiedomain . '; path=' . $cookiepath . $cookiesecure);
// header('Set-cookie: ' . $cookiename . '_sid=' . $session_id . '; domain=' . $cookiedomain . '; path=' . $cookiepath . $cookiesecure);
$SID = ( $sessionmethod == SESSION_METHOD_GET ) ? 'sid=' . $session_id : ''; $SID = ( $sessionmethod == SESSION_METHOD_GET ) ? 'sid=' . $session_id : '';
@ -194,8 +188,8 @@ function session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_a
} }
// //
// Checks for a given user session, tidies session // Checks for a given user session, tidies session table and updates user
// table and updates user sessions at each page refresh // sessions at each page refresh
// //
function session_pagestart($user_ip, $thispage_id) function session_pagestart($user_ip, $thispage_id)
{ {
@ -206,7 +200,6 @@ function session_pagestart($user_ip, $thispage_id)
$cookiepath = $board_config['cookie_path']; $cookiepath = $board_config['cookie_path'];
$cookiedomain = $board_config['cookie_domain']; $cookiedomain = $board_config['cookie_domain'];
$cookiesecure = $board_config['cookie_secure']; $cookiesecure = $board_config['cookie_secure'];
$cookiesecure = ( $board_config['cookie_secure'] ) ? '; secure' : '';
$current_time = time(); $current_time = time();
unset($userdata); unset($userdata);
@ -240,7 +233,7 @@ function session_pagestart($user_ip, $thispage_id)
AND s.session_ip = '$user_ip'"; AND s.session_ip = '$user_ip'";
if ( !($result = $db->sql_query($sql)) ) if ( !($result = $db->sql_query($sql)) )
{ {
message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch : session_pagestart', '', __LINE__, __FILE__, $sql); message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql);
} }
$userdata = $db->sql_fetchrow($result); $userdata = $db->sql_fetchrow($result);
@ -255,14 +248,27 @@ function session_pagestart($user_ip, $thispage_id)
// //
// Only update session DB a minute or so after last update // Only update session DB a minute or so after last update
// //
$last_update = ( $userdata['user_id'] == ANONYMOUS ) ? $userdata['session_time'] : $userdata['user_session_time']; if ( $current_time - $userdata['session_time'] > 60 )
{
if ( $current_time - $last_update > 60 ) // || $userdata['user_session_page'] != $thispage_id
{ // || $userdata['user_session_page'] != $thispage_id $sql = "UPDATE " . SESSIONS_TABLE . "
$sql = ( $userdata['user_id'] == ANONYMOUS ) ? "UPDATE " . SESSIONS_TABLE . " SET session_time = $current_time, session_page = $thispage_id WHERE session_id = '" . $userdata['session_id'] . "' AND session_ip = '$user_ip'" : "UPDATE " . USERS_TABLE . " SET user_session_time = $current_time, user_session_page = $thispage_id WHERE user_id = " . $userdata['user_id']; SET session_time = $current_time, session_page = $thispage_id
WHERE session_id = '" . $userdata['session_id'] . "'
AND session_ip = '$user_ip'";
if ( !$db->sql_query($sql) ) if ( !$db->sql_query($sql) )
{ {
message_die(CRITICAL_ERROR, 'Error updating sessions table : session_pagestart', '', __LINE__, __FILE__, $sql); message_die(CRITICAL_ERROR, 'Error updating sessions table', '', __LINE__, __FILE__, $sql);
}
if ( $userdata['user_id'] != ANONYMOUS )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_session_time = $current_time, user_session_page = $thispage_id
WHERE user_id = " . $userdata['user_id'];
if ( !$db->sql_query($sql) )
{
message_die(CRITICAL_ERROR, 'Error updating sessions table', '', __LINE__, __FILE__, $sql);
}
} }
// //
@ -272,15 +278,13 @@ function session_pagestart($user_ip, $thispage_id)
$sql = "DELETE FROM " . SESSIONS_TABLE . " $sql = "DELETE FROM " . SESSIONS_TABLE . "
WHERE session_time < $expiry_time WHERE session_time < $expiry_time
AND session_id <> '$session_id'"; AND session_id <> '$session_id'";
if ( !($result = $db->sql_query($sql)) ) if ( !$db->sql_query($sql) )
{ {
message_die(CRITICAL_ERROR, 'Error clearing sessions table : session_pagestart', '', __LINE__, __FILE__, $sql); message_die(CRITICAL_ERROR, 'Error clearing sessions table', '', __LINE__, __FILE__, $sql);
} }
setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure); setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure);
setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure); setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);
// header('Set-cookie: ' . $cookiename . '_data=' . urlencode(serialize($sessiondata)) . '; expires=' . gmdate("l, d-M-Y H:i:s", $current_time + 31536000) . ' GMT; domain=' . $cookiedomain . '; path=' . $cookiepath . $cookiesecure);
// header('Set-cookie: ' . $cookiename . '_sid=' . $session_id . '; domain=' . $cookiedomain . '; path=' . $cookiepath . $cookiesecure);
} }
return $userdata; return $userdata;
@ -295,7 +299,7 @@ function session_pagestart($user_ip, $thispage_id)
if ( !($userdata = session_begin($user_id, $user_ip, $thispage_id, TRUE)) ) if ( !($userdata = session_begin($user_id, $user_ip, $thispage_id, TRUE)) )
{ {
message_die(CRITICAL_ERROR, 'Error creating user session : session_pagestart', '', __LINE__, __FILE__, $sql); message_die(CRITICAL_ERROR, 'Error creating user session', '', __LINE__, __FILE__, $sql);
} }
return $userdata; return $userdata;
@ -316,7 +320,6 @@ function session_end($session_id, $user_id)
$cookiepath = $board_config['cookie_path']; $cookiepath = $board_config['cookie_path'];
$cookiedomain = $board_config['cookie_domain']; $cookiedomain = $board_config['cookie_domain'];
$cookiesecure = $board_config['cookie_secure']; $cookiesecure = $board_config['cookie_secure'];
// $cookiesecure = ( $board_config['cookie_secure'] ) ? '; secure' : '';
// //
// Pull cookiedata or grab the URI propagated sid // Pull cookiedata or grab the URI propagated sid
@ -338,20 +341,15 @@ function session_end($session_id, $user_id)
$sql = "DELETE FROM " . SESSIONS_TABLE . " $sql = "DELETE FROM " . SESSIONS_TABLE . "
WHERE session_id = '$session_id' WHERE session_id = '$session_id'
AND session_user_id = $user_id"; AND session_user_id = $user_id";
if ( !($result = $db->sql_query($sql)) ) if ( !$db->sql_query($sql) )
{ {
message_die(CRITICAL_ERROR, 'Error removing user session : session_end', '', __LINE__, __FILE__, $sql); message_die(CRITICAL_ERROR, 'Error removing user session', '', __LINE__, __FILE__, $sql);
} }
setcookie($cookiename . '_data', '', $current_time - 31536000, $cookiepath, $cookiedomain, $cookiesecure); setcookie($cookiename . '_data', '', $current_time - 31536000, $cookiepath, $cookiedomain, $cookiesecure);
setcookie($cookiename . '_sid', '', $current_time - 31536000, $cookiepath, $cookiedomain, $cookiesecure); setcookie($cookiename . '_sid', '', $current_time - 31536000, $cookiepath, $cookiedomain, $cookiesecure);
// header('Set-cookie: ' . $cookiename . '_data=0; expires=' . gmdate("l, d-M-Y H:i:s", 0) . ' GMT; domain=' . $cookiedomain . '; path=' . $cookiepath. $cookiesecure);
// header('Set-cookie: ' . $cookiename . '_sid=0; expires=' . gmdate("l, d-M-Y H:i:s", 0) . ' GMT; domain=' . $cookiedomain . '; path=' . $cookiepath . $cookiesecure);
$SID = ( $sessionmethod == SESSION_METHOD_GET ) ? 'sid=' . $session_id : '';
return TRUE;
return true;
} }
// //
@ -372,4 +370,4 @@ function append_sid($url, $non_html_amp = false)
return($url); return($url);
} }
?> ?>

View file

@ -139,6 +139,11 @@ function topic_review($topic_id, $is_inline_review)
$poster = $row['post_username']; $poster = $row['post_username'];
$poster_rank = $lang['Guest']; $poster_rank = $lang['Guest'];
} }
elseif ( $poster_id == ANONYMOUS )
{
$poster = $lang['Guest'];
$poster_rank = '';
}
$post_subject = ( $row['post_subject'] != '' ) ? $row['post_subject'] : ''; $post_subject = ( $row['post_subject'] != '' ) ? $row['post_subject'] : '';
@ -218,4 +223,4 @@ function topic_review($topic_id, $is_inline_review)
} }
} }
?> ?>

View file

@ -27,70 +27,81 @@ if ( !defined('IN_PHPBB') )
exit; exit;
} }
$sql = "SELECT user_id, user_email, user_newpasswd, user_lang $sql = "SELECT user_active, user_id, user_email, user_newpasswd, user_lang, user_actkey
FROM " . USERS_TABLE . " FROM " . USERS_TABLE . "
WHERE user_actkey = '" . str_replace("\'", "''", $HTTP_GET_VARS['act_key']) . "'"; WHERE user_id = " . intval($HTTP_GET_VARS[POST_USERS_URL]);
if ( $result = $db->sql_query($sql) ) if ( !($result = $db->sql_query($sql)) )
{
if ( $row = $db->sql_fetchrow($result) )
{
$sql_update_pass = ( $row['user_newpasswd'] != '' ) ? ", user_password = '" . str_replace("\'", "''", $row['user_newpasswd']) . "', user_newpasswd = ''" : "";
$sql = "UPDATE " . USERS_TABLE . "
SET user_active = 1, user_actkey = ''" . $sql_update_pass . "
WHERE user_id = " . $row['user_id'];
if ( $result = $db->sql_query($sql) )
{
if ( $board_config['require_activation'] == USER_ACTIVATION_ADMIN && $sql_update_pass == '' )
{
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']);
$email_headers = 'From: ' . $board_config['board_email'] . "\r\nReturn-Path: " . $board_config['board_email'] . "\r\n";
$emailer->use_template('admin_welcome_activated', $row['user_lang']);
$emailer->email_address($row['user_email']);
$emailer->set_subject();//$lang['Account_activated_subject']
$emailer->extra_headers($email_headers);
$emailer->assign_vars(array(
'SITENAME' => $board_config['sitename'],
'USERNAME' => $username,
'PASSWORD' => $password_confirm,
'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']))
);
$emailer->send();
$emailer->reset();
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="10;url=' . append_sid("index.$phpEx") . '">')
);
message_die(GENERAL_MESSAGE, $lang['Account_active_admin']);
}
else
{
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="10;url=' . append_sid("index.$phpEx") . '">')
);
$message = ( $sql_update_pass == '' ) ? $lang['Account_active'] : $lang['Password_activated'];
message_die(GENERAL_MESSAGE, $message);
}
}
else
{
message_die(GENERAL_ERROR, 'Could not update users table', '', __LINE__, __FILE__, $sql_update);
}
}
else
{
message_die(GENERAL_ERROR, $lang['Wrong_activation']); //wrongactiv
}
}
else
{ {
message_die(GENERAL_ERROR, 'Could not obtain user information', '', __LINE__, __FILE__, $sql); message_die(GENERAL_ERROR, 'Could not obtain user information', '', __LINE__, __FILE__, $sql);
} }
?> if ( $row = $db->sql_fetchrow($result) )
{
if ( $row['user_active'] && $row['user_actkey'] == '' )
{
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="10;url=' . append_sid("index.$phpEx") . '">')
);
message_die(GENERAL_MESSAGE, $lang['Already_activated']);
}
else if ( $row['user_actkey'] == $HTTP_GET_VARS['act_key'] )
{
$sql_update_pass = ( $row['user_newpasswd'] != '' ) ? ", user_password = '" . str_replace("\'", "''", $row['user_newpasswd']) . "', user_newpasswd = ''" : '';
$sql = "UPDATE " . USERS_TABLE . "
SET user_active = 1, user_actkey = ''" . $sql_update_pass . "
WHERE user_id = " . $row['user_id'];
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update users table', '', __LINE__, __FILE__, $sql_update);
}
if ( $board_config['require_activation'] == USER_ACTIVATION_ADMIN && $sql_update_pass == '' )
{
include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']);
$email_headers = 'From: ' . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\n";
$emailer->use_template('admin_welcome_activated', $row['user_lang']);
$emailer->email_address($row['user_email']);
$emailer->set_subject();//$lang['Account_activated_subject']
$emailer->extra_headers($email_headers);
$emailer->assign_vars(array(
'SITENAME' => $board_config['sitename'],
'USERNAME' => $username,
'PASSWORD' => $password_confirm,
'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']))
);
$emailer->send();
$emailer->reset();
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="10;url=' . append_sid("index.$phpEx") . '">')
);
message_die(GENERAL_MESSAGE, $lang['Account_active_admin']);
}
else
{
$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="10;url=' . append_sid("index.$phpEx") . '">')
);
$message = ( $sql_update_pass == '' ) ? $lang['Account_active'] : $lang['Password_activated'];
message_die(GENERAL_MESSAGE, $message);
}
}
else
{
message_die(GENERAL_MESSAGE, $lang['Wrong_activation']);
}
}
else
{
message_die(GENERAL_MESSAGE, $lang['No_such_user']);
}
?>

View file

@ -74,7 +74,7 @@ function user_avatar_url($mode, &$error, &$error_msg, $avatar_filename)
$avatar_filename = 'http://' . $avatar_filename; $avatar_filename = 'http://' . $avatar_filename;
} }
if ( !preg_match('#^(http:\/\/[a-z0-9\-]+?\.([a-z0-9\-]+\.)*[a-z]+(:[0-9]+)*\/.*?\.(gif|jpg|jpeg|png)$)#is', $avatar_filename) ) if ( !preg_match('#^(http:\/\/[a-z0-9\-]+?\.([a-z0-9\-]+\.)*[a-z]+(:[0-9]+)*\/[^\"]*?\.(gif|jpg|jpeg|png)$)#is', $avatar_filename) )
{ {
$error = true; $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 />' . $lang['Wrong_remote_avatar_format'] : $lang['Wrong_remote_avatar_format'];
@ -162,7 +162,7 @@ function user_avatar_upload($mode, $avatar_mode, &$current_avatar, &$current_typ
{ {
if ( $avatar_filesize <= $board_config['avatar_filesize'] && $avatar_filesize > 0 ) if ( $avatar_filesize <= $board_config['avatar_filesize'] && $avatar_filesize > 0 )
{ {
preg_match("'image\/[x\-]*([a-z]+)'", $avatar_filetype, $avatar_filetype); preg_match('#image\/[x\-]*([a-z]+)#', $avatar_filetype, $avatar_filetype);
$avatar_filetype = $avatar_filetype[1]; $avatar_filetype = $avatar_filetype[1];
} }
else else
@ -184,7 +184,7 @@ function user_avatar_upload($mode, $avatar_mode, &$current_avatar, &$current_typ
if ( $width <= $board_config['avatar_max_width'] && $height <= $board_config['avatar_max_height'] ) if ( $width <= $board_config['avatar_max_width'] && $height <= $board_config['avatar_max_height'] )
{ {
$new_filename = ( $current_avatar != '' && $mode != 'register' ) ? $current_avatar : uniqid($user_ip) . $imgtype; $new_filename = uniqid($user_ip) . $imgtype;
if ( $mode == 'editprofile' && $current_type == USER_AVATAR_UPLOAD && $current_avatar != '' ) if ( $mode == 'editprofile' && $current_type == USER_AVATAR_UPLOAD && $current_avatar != '' )
{ {
@ -233,7 +233,7 @@ function user_avatar_upload($mode, $avatar_mode, &$current_avatar, &$current_typ
return $avatar_sql; return $avatar_sql;
} }
function display_avatar_gallery($mode, &$category, &$user_id, &$email, &$current_email, &$coppa, &$username, &$email, &$icq, &$aim, &$msn, &$yim, &$website, &$location, &$occupation, &$interests, &$signature, &$viewemail, &$notifypm, &$popuppm, &$notifyreply, &$attachsig, &$allowhtml, &$allowbbcode, &$allowsmilies, &$allowviewonline, &$style, &$language, &$timezone, &$dateformat) function display_avatar_gallery($mode, &$category, &$user_id, &$email, &$current_email, &$coppa, &$username, &$email, &$new_password, &$cur_password, &$password_confirm, &$icq, &$aim, &$msn, &$yim, &$website, &$location, &$occupation, &$interests, &$signature, &$viewemail, &$notifypm, &$popuppm, &$notifyreply, &$attachsig, &$allowhtml, &$allowbbcode, &$allowsmilies, &$hideonline, &$style, &$language, &$timezone, &$dateformat)
{ {
global $board_config, $db, $template, $lang, $images, $theme; global $board_config, $db, $template, $lang, $images, $theme;
global $phpbb_root_path, $phpEx; global $phpbb_root_path, $phpEx;
@ -309,7 +309,7 @@ function display_avatar_gallery($mode, &$category, &$user_id, &$email, &$current
} }
} }
$params = array('coppa', 'user_id', 'username', 'email', 'current_email', 'icq', 'aim', 'msn', 'yim', 'website', 'location', 'occupation', 'interests', 'signature', 'viewemail', 'notifypm', 'popuppm', 'notifyreply', 'attachsig', 'allowhtml', 'allowbbcode', 'allowsmilies', 'allowviewonline', 'style', 'language', 'timezone', 'dateformat'); $params = array('coppa', 'user_id', 'username', 'email', 'current_email', 'cur_password', 'new_password', 'password_confirm', 'icq', 'aim', 'msn', 'yim', 'website', 'location', 'occupation', 'interests', 'signature', 'viewemail', 'notifypm', 'popuppm', 'notifyreply', 'attachsig', 'allowhtml', 'allowbbcode', 'allowsmilies', 'hideonline', 'style', 'language', 'timezone', 'dateformat');
$s_hidden_vars = '<input type="hidden" name="agreed" value="true" />'; $s_hidden_vars = '<input type="hidden" name="agreed" value="true" />';

View file

@ -27,12 +27,6 @@ if ( !defined('IN_PHPBB') )
exit; exit;
} }
if ( !$userdata['session_logged_in'] )
{
header('Location: ' . append_sid("login.$phpEx?redirect=profile.$phpEx&mode=email&" . POST_USERS_URL . "=$user_id", true));
exit;
}
if ( !empty($HTTP_GET_VARS[POST_USERS_URL]) || !empty($HTTP_POST_VARS[POST_USERS_URL]) ) if ( !empty($HTTP_GET_VARS[POST_USERS_URL]) || !empty($HTTP_POST_VARS[POST_USERS_URL]) )
{ {
$user_id = ( !empty($HTTP_GET_VARS[POST_USERS_URL]) ) ? $HTTP_GET_VARS[POST_USERS_URL] : $HTTP_POST_VARS[POST_USERS_URL]; $user_id = ( !empty($HTTP_GET_VARS[POST_USERS_URL]) ) ? $HTTP_GET_VARS[POST_USERS_URL] : $HTTP_POST_VARS[POST_USERS_URL];
@ -42,6 +36,12 @@ else
message_die(GENERAL_MESSAGE, $lang['No_user_specified']); message_die(GENERAL_MESSAGE, $lang['No_user_specified']);
} }
if ( !$userdata['session_logged_in'] )
{
header('Location: ' . append_sid("login.$phpEx?redirect=profile.$phpEx&mode=email&" . POST_USERS_URL . "=$user_id", true));
exit;
}
$sql = "SELECT username, user_email, user_viewemail, user_lang $sql = "SELECT username, user_email, user_viewemail, user_lang
FROM " . USERS_TABLE . " FROM " . USERS_TABLE . "
WHERE user_id = $user_id"; WHERE user_id = $user_id";
@ -94,16 +94,11 @@ if ( $result = $db->sql_query($sql) )
include($phpbb_root_path . 'includes/emailer.'.$phpEx); include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']); $emailer = new emailer($board_config['smtp_delivery']);
$email_headers = 'From: ' . $userdata['user_email'] . "\n"; $email_headers = 'Return-Path: ' . $userdata['user_email'] . "\nFrom: " . $userdata['user_email'] . "\n";
if ( !empty($HTTP_POST_VARS['cc_email']) )
{
$email_headers .= "Cc: " . $userdata['user_email'] . "\n";
}
$email_headers .= 'Return-Path: ' . $userdata['user_email'] . "\n";
$email_headers .= 'X-AntiAbuse: Board servername - ' . $server_name . "\n"; $email_headers .= 'X-AntiAbuse: Board servername - ' . $server_name . "\n";
$email_headers .= 'X-AntiAbuse: User_id - ' . $userdata['user_id'] . "\n"; $email_headers .= 'X-AntiAbuse: User_id - ' . $userdata['user_id'] . "\n";
$email_headers .= 'X-AntiAbuse: Username - ' . $userdata['username'] . "\n"; $email_headers .= 'X-AntiAbuse: Username - ' . $userdata['username'] . "\n";
$email_headers .= 'X-AntiAbuse: User IP - ' . decode_ip($user_ip) . "\r\n"; $email_headers .= 'X-AntiAbuse: User IP - ' . decode_ip($user_ip) . "\n";
$emailer->use_template('profile_send_email', $user_lang); $emailer->use_template('profile_send_email', $user_lang);
$emailer->email_address($user_email); $emailer->email_address($user_email);
@ -120,6 +115,25 @@ if ( $result = $db->sql_query($sql) )
$emailer->send(); $emailer->send();
$emailer->reset(); $emailer->reset();
if ( !empty($HTTP_POST_VARS['cc_email']) )
{
$email_headers = 'Return-Path: ' . $userdata['user_email'] . "\nFrom: " . $userdata['user_email'] . "\n";
$emailer->use_template('profile_send_email');
$emailer->email_address($userdata['user_email']);
$emailer->set_subject($subject);
$emailer->extra_headers($email_headers);
$emailer->assign_vars(array(
'SITENAME' => $board_config['sitename'],
'BOARD_EMAIL' => $board_config['board_email'],
'FROM_USERNAME' => $userdata['username'],
'TO_USERNAME' => $username,
'MESSAGE' => $message)
);
$emailer->send();
$emailer->reset();
}
$template->assign_vars(array( $template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="5;url=' . append_sid("index.$phpEx") . '">') 'META' => '<meta http-equiv="refresh" content="5;url=' . append_sid("index.$phpEx") . '">')
); );

View file

@ -27,11 +27,11 @@ if ( !defined('IN_PHPBB') )
exit; exit;
} }
// // ---------------------------------------
// Load agreement template since user has not yet // Load agreement template since user has not yet
// agreed to registration conditions/coppa // agreed to registration conditions/coppa
// //
function show_coppa(&$coppa) function show_coppa()
{ {
global $template, $lang, $phpbb_root_path, $phpEx; global $template, $lang, $phpbb_root_path, $phpEx;
@ -40,7 +40,6 @@ function show_coppa(&$coppa)
); );
$template->assign_vars(array( $template->assign_vars(array(
'COPPA' => $coppa,
'REGISTRATION' => $lang['Registration'], 'REGISTRATION' => $lang['Registration'],
'AGREEMENT' => $lang['Reg_agreement'], 'AGREEMENT' => $lang['Reg_agreement'],
"AGREE_OVER_13" => $lang['Agree_over_13'], "AGREE_OVER_13" => $lang['Agree_over_13'],
@ -55,8 +54,7 @@ function show_coppa(&$coppa)
} }
// //
// // ---------------------------------------
//
$error = FALSE; $error = FALSE;
$page_title = ( $mode == 'editprofile' ) ? $lang['Edit_profile'] : $lang['Register']; $page_title = ( $mode == 'editprofile' ) ? $lang['Edit_profile'] : $lang['Register'];
@ -65,12 +63,12 @@ if ( $mode == 'register' && !isset($HTTP_POST_VARS['agreed']) && !isset($HTTP_GE
{ {
include($phpbb_root_path . 'includes/page_header.'.$phpEx); include($phpbb_root_path . 'includes/page_header.'.$phpEx);
show_coppa($coppa); show_coppa();
include($phpbb_root_path . 'includes/page_tail.'.$phpEx); include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
} }
$coppa = ( ( !$HTTP_POST_VARS['coppa'] && !$HTTP_GET_VARS['coppa'] ) || $mode == 'register' ) ? 0 : TRUE; $coppa = ( empty($HTTP_POST_VARS['coppa']) && empty($HTTP_GET_VARS['coppa']) ) ? 0 : TRUE;
// //
// Check and initialize some variables if needed // Check and initialize some variables if needed
@ -102,7 +100,7 @@ if (
} }
} }
$trim_var_list = array('password_current' => 'cur_password', 'password' => 'new_password', 'password_confirm' => 'password_confirm', 'signature' => 'signature'); $trim_var_list = array('cur_password' => 'cur_password', 'new_password' => 'new_password', 'password_confirm' => 'password_confirm', 'signature' => 'signature');
while( list($var, $param) = @each($trim_var_list) ) while( list($var, $param) = @each($trim_var_list) )
{ {
@ -180,8 +178,9 @@ if (
{ {
$username = stripslashes($username); $username = stripslashes($username);
$email = stripslashes($email); $email = stripslashes($email);
$password = ''; $cur_password = stripslashes($cur_password);
$password_confirm = ''; $new_password = stripslashes($new_password);
$password_confirm = stripslashes($password_confirm);
$icq = stripslashes($icq); $icq = stripslashes($icq);
$aim = stripslashes($aim); $aim = stripslashes($aim);
@ -223,25 +222,23 @@ if ( isset($HTTP_POST_VARS['submit']) )
} }
else if ( $mode == 'register' ) else if ( $mode == 'register' )
{ {
$coppa = (!$HTTP_POST_VARS['coppa'] && !$HTTP_GET_VARS['coppa']) ? 0 : TRUE; if ( empty($username) || empty($new_password) || empty($password_confirm) || empty($email) )
if ( empty($username) || empty($password) || empty($password_confirm) || empty($email) )
{ {
$error = TRUE; $error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Fields_empty']; $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Fields_empty'];
} }
} }
$passwd_sql = ''; $passwd_sql = '';
if ( !empty($password) && !empty($password_confirm) ) if ( !empty($new_password) && !empty($password_confirm) )
{ {
if ( $password != $password_confirm ) if ( $new_password != $password_confirm )
{ {
$error = TRUE; $error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_mismatch']; $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_mismatch'];
} }
else if ( strlen($password) > 32 ) else if ( strlen($new_password) > 32 )
{ {
$error = TRUE; $error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_long']; $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_long'];
@ -260,7 +257,7 @@ if ( isset($HTTP_POST_VARS['submit']) )
$row = $db->sql_fetchrow($result); $row = $db->sql_fetchrow($result);
if ( $row['user_password'] != md5($password_current) ) if ( $row['user_password'] != md5($cur_password) )
{ {
$error = TRUE; $error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Current_password_mismatch']; $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Current_password_mismatch'];
@ -269,12 +266,12 @@ if ( isset($HTTP_POST_VARS['submit']) )
if ( !$error ) if ( !$error )
{ {
$password = md5($password); $new_password = md5($new_password);
$passwd_sql = "user_password = '$password', "; $passwd_sql = "user_password = '$new_password', ";
} }
} }
} }
else if ( ( empty($password) && !empty($password_confirm) ) || ( !empty($password) && empty($password_confirm) ) ) else if ( ( empty($new_password) && !empty($password_confirm) ) || ( !empty($new_password) && empty($password_confirm) ) )
{ {
$error = TRUE; $error = TRUE;
$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_mismatch']; $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_mismatch'];
@ -306,7 +303,7 @@ if ( isset($HTTP_POST_VARS['submit']) )
$row = $db->sql_fetchrow($result); $row = $db->sql_fetchrow($result);
if ( $row['user_password'] != md5($password_current) ) if ( $row['user_password'] != md5($cur_password) )
{ {
$email = $userdata['user_email']; $email = $userdata['user_email'];
@ -356,7 +353,7 @@ if ( isset($HTTP_POST_VARS['submit']) )
if ( isset($HTTP_POST_VARS['avatardel']) && $mode == 'editprofile' ) if ( isset($HTTP_POST_VARS['avatardel']) && $mode == 'editprofile' )
{ {
$avatar_sql = user_avatar_delete($userdata['avatar_type'], $userdata['avatar_file']); $avatar_sql = user_avatar_delete($userdata['user_avatar_type'], $userdata['user_avatar']);
} }
else if ( ( !empty($user_avatar_upload) || !empty($user_avatar_name) ) && $board_config['allow_avatar_upload'] ) else if ( ( !empty($user_avatar_upload) || !empty($user_avatar_name) ) && $board_config['allow_avatar_upload'] )
{ {
@ -391,12 +388,13 @@ if ( isset($HTTP_POST_VARS['submit']) )
if ( $mode == 'editprofile' ) if ( $mode == 'editprofile' )
{ {
if ( $email != $current_email && ( $board_config['require_activation'] == USER_ACTIVATION_SELF || $board_config['require_activation'] == USER_ACTIVATION_ADMIN ) && $userdata['user_level'] != ADMIN ) if ( $email != $userdata['user_email'] && $board_config['require_activation'] != USER_ACTIVATION_NONE && $userdata['user_level'] != ADMIN )
{ {
$user_active = 0; $user_active = 0;
$user_actkey = gen_rand_string(true); $user_actkey = gen_rand_string(true);
$key_len = 54 - (strlen($server_url)); $key_len = 54 - ( strlen($server_url) );
$key_len = ($key_len > 6) ? $key_len : 6; $key_len = ( $key_len > 6 ) ? $key_len : 6;
$user_actkey = substr($user_actkey, 0, $key_len); $user_actkey = substr($user_actkey, 0, $key_len);
if ( $userdata['session_logged_in'] ) if ( $userdata['session_logged_in'] )
@ -426,7 +424,7 @@ if ( isset($HTTP_POST_VARS['submit']) )
include($phpbb_root_path . 'includes/emailer.'.$phpEx); include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']); $emailer = new emailer($board_config['smtp_delivery']);
$email_headers = "From: " . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\r\n"; $email_headers = "From: " . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\n";
$emailer->use_template('user_activate', stripslashes($user_lang)); $emailer->use_template('user_activate', stripslashes($user_lang));
$emailer->email_address($email); $emailer->email_address($email);
@ -438,7 +436,7 @@ if ( isset($HTTP_POST_VARS['submit']) )
'USERNAME' => $username, 'USERNAME' => $username,
'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']), 'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']),
'U_ACTIVATE' => $server_url . '?mode=activate&act_key=' . $user_actkey) 'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey)
); );
$emailer->send(); $emailer->send();
$emailer->reset(); $emailer->reset();
@ -488,7 +486,7 @@ if ( isset($HTTP_POST_VARS['submit']) )
// Get current date // Get current date
// //
$sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey) $sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)
VALUES ($user_id, '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", "''", $password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $location) . "', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $signature) . "', '$signature_bbcode_uid', $avatar_sql, $viewemail, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $popuppm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', $user_style, 0, 1, "; VALUES ($user_id, '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $location) . "', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $signature) . "', '$signature_bbcode_uid', $avatar_sql, $viewemail, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $popuppm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', $user_style, 0, 1, ";
if ( $board_config['require_activation'] == USER_ACTIVATION_SELF || $board_config['require_activation'] == USER_ACTIVATION_ADMIN || $coppa ) if ( $board_config['require_activation'] == USER_ACTIVATION_SELF || $board_config['require_activation'] == USER_ACTIVATION_ADMIN || $coppa )
{ {
$user_actkey = gen_rand_string(true); $user_actkey = gen_rand_string(true);
@ -545,7 +543,7 @@ if ( isset($HTTP_POST_VARS['submit']) )
include($phpbb_root_path . 'includes/emailer.'.$phpEx); include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']); $emailer = new emailer($board_config['smtp_delivery']);
$email_headers = "From: " . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\r\n"; $email_headers = "From: " . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\n";
$emailer->use_template($email_template, stripslashes($user_lang)); $emailer->use_template($email_template, stripslashes($user_lang));
$emailer->email_address($email); $emailer->email_address($email);
@ -561,8 +559,6 @@ if ( isset($HTTP_POST_VARS['submit']) )
'PASSWORD' => $password_confirm, 'PASSWORD' => $password_confirm,
'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']), 'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']),
'U_ACTIVATE' => $server_url . '?mode=activate&act_key=' . $user_actkey,
'FAX_INFO' => $board_config['coppa_fax'], 'FAX_INFO' => $board_config['coppa_fax'],
'MAIL_INFO' => $board_config['coppa_mail'], 'MAIL_INFO' => $board_config['coppa_mail'],
'EMAIL_ADDRESS' => $email, 'EMAIL_ADDRESS' => $email,
@ -585,7 +581,7 @@ if ( isset($HTTP_POST_VARS['submit']) )
'PASSWORD' => $password_confirm, 'PASSWORD' => $password_confirm,
'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']), 'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']),
'U_ACTIVATE' => $server_url . '?mode=activate&act_key=' . $user_actkey) 'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey)
); );
} }
@ -603,7 +599,7 @@ if ( isset($HTTP_POST_VARS['submit']) )
'USERNAME' => $username, 'USERNAME' => $username,
'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']), 'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']),
'U_ACTIVATE' => $server_url . '?mode=activate&act_key=' . $user_actkey) 'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey)
); );
$emailer->send(); $emailer->send();
$emailer->reset(); $emailer->reset();
@ -624,7 +620,7 @@ if ( $error )
// //
$username = stripslashes($username); $username = stripslashes($username);
$email = stripslashes($email); $email = stripslashes($email);
$password = ''; $new_password = '';
$password_confirm = ''; $password_confirm = '';
$icq = stripslashes($icq); $icq = stripslashes($icq);
@ -647,7 +643,7 @@ else if ( $mode == 'editprofile' && !isset($HTTP_POST_VARS['avatargallery']) &&
$user_id = $userdata['user_id']; $user_id = $userdata['user_id'];
$username = htmlspecialchars($userdata['username']); $username = htmlspecialchars($userdata['username']);
$email = $userdata['user_email']; $email = $userdata['user_email'];
$password = ''; $new_password = '';
$password_confirm = ''; $password_confirm = '';
$icq = $userdata['user_icq']; $icq = $userdata['user_icq'];
@ -660,7 +656,7 @@ else if ( $mode == 'editprofile' && !isset($HTTP_POST_VARS['avatargallery']) &&
$occupation = htmlspecialchars($userdata['user_occ']); $occupation = htmlspecialchars($userdata['user_occ']);
$interests = htmlspecialchars($userdata['user_interests']); $interests = htmlspecialchars($userdata['user_interests']);
$signature_bbcode_uid = $userdata['user_sig_bbcode_uid']; $signature_bbcode_uid = $userdata['user_sig_bbcode_uid'];
$signature = ( $signature_bbcode_uid != '' ) ? preg_replace("/\:(([a-z0-9]:)?)$signature_bbcode_uid/si", '', $userdata['user_sig']) : $userdata['user_sig']; $signature = ( $signature_bbcode_uid != '' ) ? preg_replace("/:(([a-z0-9]+:)?)$signature_bbcode_uid\]/si", ']', $userdata['user_sig']) : $userdata['user_sig'];
$viewemail = $userdata['user_viewemail']; $viewemail = $userdata['user_viewemail'];
$notifypm = $userdata['user_notify_pm']; $notifypm = $userdata['user_notify_pm'];
@ -707,7 +703,9 @@ if( isset($HTTP_POST_VARS['avatargallery']) && !$error )
'body' => 'profile_avatar_gallery.tpl') 'body' => 'profile_avatar_gallery.tpl')
); );
display_avatar_gallery($mode, $avatar_category, $user_id, $email, $current_email, $coppa, $username, $email, $icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature, $viewemail, $notifypm, $popuppm, $notifyreply, $attachsig, $allowhtml, $allowbbcode, $allowsmilies, $allowviewonline, $user_style, $user_lang, $user_timezone, $user_dateformat); $allowviewonline = !$allowviewonline;
display_avatar_gallery($mode, $avatar_category, $user_id, $email, $current_email, $coppa, $username, $email, &$new_password, &$cur_password, $password_confirm, $icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature, $viewemail, $notifypm, $popuppm, $notifyreply, $attachsig, $allowhtml, $allowbbcode, $allowsmilies, $allowviewonline, $user_style, $user_lang, $user_timezone, $user_dateformat);
} }
else else
{ {
@ -723,8 +721,6 @@ else
$selected_template = $board_config['system_template']; $selected_template = $board_config['system_template'];
} }
$signature = preg_replace('/\:[0-9a-z\:]*?\]/si', ']', $signature);
$avatar_img = ''; $avatar_img = '';
if ( $user_avatar_type ) if ( $user_avatar_type )
{ {
@ -787,10 +783,13 @@ else
// us from doing file uploads.... // us from doing file uploads....
// //
$ini_val = ( phpversion() >= '4.0.0' ) ? 'ini_get' : 'get_cfg_var'; $ini_val = ( phpversion() >= '4.0.0' ) ? 'ini_get' : 'get_cfg_var';
$form_enctype = ( !@$ini_val('file_uploads') || phpversion() == '4.0.4pl1' || !$board_config['allow_avatar_upload'] || ( phpversion() < '4.0.3' && @$ini_val('open_basedir') != '' ) ) ? '' : 'enctype="multipart/form-data"'; $form_enctype = ( @$ini_val('file_uploads') == '0' || strtolower(@$ini_val('file_uploads') == 'off') || phpversion() == '4.0.4pl1' || !$board_config['allow_avatar_upload'] || ( phpversion() < '4.0.3' && @$ini_val('open_basedir') != '' ) ) ? '' : 'enctype="multipart/form-data"';
$template->assign_vars(array( $template->assign_vars(array(
'USERNAME' => $username, 'USERNAME' => $username,
'CUR_PASSWORD' => $cur_password,
'NEW_PASSWORD' => $new_password,
'PASSWORD_CONFIRM' => $password_confirm,
'EMAIL' => $email, 'EMAIL' => $email,
'YIM' => $yim, 'YIM' => $yim,
'ICQ' => $icq, 'ICQ' => $icq,
@ -899,27 +898,30 @@ else
// of the templates to 'fake' an IF...ELSE...ENDIF solution // of the templates to 'fake' an IF...ELSE...ENDIF solution
// it works well :) // it works well :)
// //
if ( $userdata['user_allowavatar'] && ( $board_config['allow_avatar_upload'] || $board_config['allow_avatar_local'] || $board_config['allow_avatar_remote'] ) ) if ( $mode != 'register' )
{ {
$template->assign_block_vars('switch_avatar_block', array() ); if ( $userdata['user_allowavatar'] && ( $board_config['allow_avatar_upload'] || $board_config['allow_avatar_local'] || $board_config['allow_avatar_remote'] ) )
if ( $board_config['allow_avatar_upload'] && file_exists('./' . $board_config['avatar_path']) )
{ {
if ( $form_enctype != '' ) $template->assign_block_vars('switch_avatar_block', array() );
if ( $board_config['allow_avatar_upload'] && file_exists('./' . $board_config['avatar_path']) )
{ {
$template->assign_block_vars('switch_avatar_block.switch_avatar_local_upload', array() ); if ( $form_enctype != '' )
{
$template->assign_block_vars('switch_avatar_block.switch_avatar_local_upload', array() );
}
$template->assign_block_vars('switch_avatar_block.switch_avatar_remote_upload', array() );
} }
$template->assign_block_vars('switch_avatar_block.switch_avatar_remote_upload', array() );
}
if ( $board_config['allow_avatar_remote'] ) if ( $board_config['allow_avatar_remote'] )
{ {
$template->assign_block_vars('switch_avatar_block.switch_avatar_remote_link', array() ); $template->assign_block_vars('switch_avatar_block.switch_avatar_remote_link', array() );
} }
if ( $board_config['allow_avatar_local'] && file_exists('./' . $board_config['avatar_gallery_path']) ) if ( $board_config['allow_avatar_local'] && file_exists('./' . $board_config['avatar_gallery_path']) )
{ {
$template->assign_block_vars('switch_avatar_block.switch_avatar_local_gallery', array() ); $template->assign_block_vars('switch_avatar_block.switch_avatar_local_gallery', array() );
}
} }
} }
} }

View file

@ -46,6 +46,7 @@ if ( isset($HTTP_POST_VARS['submit']) )
} }
$username = $row['username']; $username = $row['username'];
$user_id = $row['user_id'];
$user_actkey = gen_rand_string(true); $user_actkey = gen_rand_string(true);
$key_len = 54 - strlen($server_url); $key_len = 54 - strlen($server_url);
@ -54,7 +55,7 @@ if ( isset($HTTP_POST_VARS['submit']) )
$user_password = gen_rand_string(false); $user_password = gen_rand_string(false);
$sql = "UPDATE " . USERS_TABLE . " $sql = "UPDATE " . USERS_TABLE . "
SET user_newpasswd = '" .md5($user_password) . "', user_actkey = '$user_actkey' SET user_newpasswd = '" . md5($user_password) . "', user_actkey = '$user_actkey'
WHERE user_id = " . $row['user_id']; WHERE user_id = " . $row['user_id'];
if ( !$db->sql_query($sql) ) if ( !$db->sql_query($sql) )
{ {
@ -64,7 +65,7 @@ if ( isset($HTTP_POST_VARS['submit']) )
include($phpbb_root_path . 'includes/emailer.'.$phpEx); include($phpbb_root_path . 'includes/emailer.'.$phpEx);
$emailer = new emailer($board_config['smtp_delivery']); $emailer = new emailer($board_config['smtp_delivery']);
$email_headers = 'From: ' . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\r\n"; $email_headers = 'From: ' . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\n";
$emailer->use_template('user_activate_passwd', $row['user_lang']); $emailer->use_template('user_activate_passwd', $row['user_lang']);
$emailer->email_address($row['user_email']); $emailer->email_address($row['user_email']);
@ -77,7 +78,7 @@ if ( isset($HTTP_POST_VARS['submit']) )
'PASSWORD' => $user_password, 'PASSWORD' => $user_password,
'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']), 'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']),
'U_ACTIVATE' => $server_url . "?mode=activate&act_key=$user_actkey") 'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey)
); );
$emailer->send(); $emailer->send();
$emailer->reset(); $emailer->reset();
@ -124,11 +125,13 @@ $template->assign_vars(array(
'L_ITEMS_REQUIRED' => $lang['Items_required'], 'L_ITEMS_REQUIRED' => $lang['Items_required'],
'L_EMAIL_ADDRESS' => $lang['Email_address'], 'L_EMAIL_ADDRESS' => $lang['Email_address'],
'L_SUBMIT' => $lang['Submit'], 'L_SUBMIT' => $lang['Submit'],
'L_RESET' => $lang['Reset']) 'L_RESET' => $lang['Reset'],
'S_PROFILE_ACTION' => append_sid("profile.$phpEx?mode=sendpassword"))
); );
$template->pparse('body'); $template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx); include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?> ?>

View file

@ -344,6 +344,7 @@ else
else else
{ {
header("Location: " . append_sid("index.$phpEx", true)); header("Location: " . append_sid("index.$phpEx", true));
exit;
} }
} }

View file

@ -1,4 +1,5 @@
Subject: Llogari e re Subject: Llogari e re
Charset: iso-8859-1
Përshëndetje, Përshëndetje,

View file

@ -1,3 +1,5 @@
Charset: iso-8859-1
Mesazhi i mëposhtëm është dërguar nga një administrator i "{SITENAME}". Nqs ky mesazh është i padëshirueshëm, abuzues apo përmban material të pahijshëm ju lutem kontaktoni webmasterin tek adresa: Mesazhi i mëposhtëm është dërguar nga një administrator i "{SITENAME}". Nqs ky mesazh është i padëshirueshëm, abuzues apo përmban material të pahijshëm ju lutem kontaktoni webmasterin tek adresa:
{BOARD_EMAIL} {BOARD_EMAIL}

View file

@ -1,4 +1,5 @@
Subject: Llogaria u aktivizia Subject: Llogaria u aktivizia
Charset: iso-8859-1
Përshëndetje {USERNAME}, Përshëndetje {USERNAME},

View file

@ -1,4 +1,5 @@
Subject: Mirsevini tek forumi i {SITENAME} Subject: Mirsevini tek forumi i {SITENAME}
Charset: iso-8859-1
{WELCOME_MSG} {WELCOME_MSG}

View file

@ -1,4 +1,5 @@
Subject: Mirsevini tek forumi i {SITENAME} Subject: Mirsevini tek forumi i {SITENAME}
Charset: iso-8859-1
{WELCOME_MSG} {WELCOME_MSG}

View file

@ -1,4 +1,5 @@
Subject: Jeni anëtar i këtij grupi tashmë Subject: Jeni anëtar i këtij grupi tashmë
Charset: iso-8859-1
Urime, Urime,

View file

@ -1,4 +1,5 @@
Subject: Kërkesa juaj u aprovua Subject: Kërkesa juaj u aprovua
Charset: iso-8859-1
Urime, Urime,

View file

@ -1,4 +1,5 @@
Subject: Dikush ka bërë kërkesë për anëtarësim tek grupi juaj Subject: Dikush ka bërë kërkesë për anëtarësim tek grupi juaj
Charset: iso-8859-1
I nderuar {GROUP_MODERATOR}, I nderuar {GROUP_MODERATOR},

View file

@ -1,4 +1,5 @@
Subject: Sapo keni marrë mesazh privat të ri Subject: Sapo keni marrë mesazh privat të ri
Charset: iso-8859-1
Përshëndetje {USERNAME}, Përshëndetje {USERNAME},

View file

@ -1,3 +1,5 @@
Charset: iso-8859-1
Përshëndetje {TO_USERNAME}, Përshëndetje {TO_USERNAME},
Mesazhi i mëposhtëm u dërgua për ju nga {FROM_USERNAME} nëpërmjet llogarisë tuaj tek {SITENAME}. Nqs ky mesazh është i padëshirueshëm, abuzues apo përmban material të pahijshëm ju lutem kontaktoni webmasterin tek adresa: Mesazhi i mëposhtëm u dërgua për ju nga {FROM_USERNAME} nëpërmjet llogarisë tuaj tek {SITENAME}. Nqs ky mesazh është i padëshirueshëm, abuzues apo përmban material të pahijshëm ju lutem kontaktoni webmasterin tek adresa:

View file

@ -1,4 +1,5 @@
Subject: Përgjigje tek tema - {TOPIC_TITLE} Subject: Përgjigje tek tema - {TOPIC_TITLE}
Charset: iso-8859-1
Përshëndetje {USERNAME}, Përshëndetje {USERNAME},

View file

@ -1,4 +1,5 @@
Subject: Riaktivizoni llogarinë tuaj Subject: Riaktivizoni llogarinë tuaj
Charset: iso-8859-1
Përshëndetje {USERNAME}, Përshëndetje {USERNAME},

View file

@ -1,4 +1,5 @@
Subject: Aktivizoni fjalëkalimin e ri Subject: Aktivizoni fjalëkalimin e ri
Charset: iso-8859-1
Përshëndetje {USERNAME} Përshëndetje {USERNAME}

View file

@ -1,4 +1,5 @@
Subject: Mirsevini tek forumi i {SITENAME} Subject: Mirsevini tek forumi i {SITENAME}
Charset: iso-8859-1
{WELCOME_MSG} {WELCOME_MSG}

View file

@ -1,4 +1,5 @@
Subject: Mirsevini tek forumi i {SITENAME} Subject: Mirsevini tek forumi i {SITENAME}
Charset: iso-8859-1
{WELCOME_MSG} {WELCOME_MSG}

View file

@ -1,4 +1,5 @@
Subject: гФКСЯ МПнП Subject: гФКСЯ МПнП
Charset: windows-1256
гСНИЗ, гСНИЗ,

View file

@ -1,3 +1,5 @@
Charset: windows-1256
هذه رسالة من مدير "{SITENAME}". اذا كانت هذه الرسالة اعلانات, تحتوي على لغة بذيئة أو اي كلام غير ملائم الرجاء مراسلة مسؤول الموقع على العنوان التالي: هذه رسالة من مدير "{SITENAME}". اذا كانت هذه الرسالة اعلانات, تحتوي على لغة بذيئة أو اي كلام غير ملائم الرجاء مراسلة مسؤول الموقع على العنوان التالي:
{BOARD_EMAIL} {BOARD_EMAIL}

View file

@ -1,4 +1,5 @@
Subject: تم تشغيل الاشتراك Subject: تم تشغيل الاشتراك
Charset: windows-1256
مرحبا {USERNAME}, مرحبا {USERNAME},

View file

@ -1,4 +1,5 @@
Subject: أهلا وسهلا بكم في منتدى {SITENAME} Subject: أهلا وسهلا بكم في منتدى {SITENAME}
Charset: windows-1256
{WELCOME_MSG} {WELCOME_MSG}

View file

@ -1,4 +1,5 @@
Subject: أهلا وسهلا بكم في منتدى {SITENAME} Subject: أهلا وسهلا بكم في منتدى {SITENAME}
Charset: windows-1256
{WELCOME_MSG} {WELCOME_MSG}

View file

@ -1,4 +1,5 @@
Subject: تم اضافتك للمجموعة Subject: تم اضافتك للمجموعة
Charset: windows-1256
مبروك, مبروك,

View file

@ -1,4 +1,5 @@
Subject: تمت الموافقة على طلبك Subject: تمت الموافقة على طلبك
Charset: windows-1256
مبروك, مبروك,

View file

@ -1,4 +1,5 @@
Subject: تم تقديم طلبك للاشتراك في المجموعة Subject: تم تقديم طلبك للاشتراك في المجموعة
Charset: windows-1256
السيد/ة {GROUP_MODERATOR}, السيد/ة {GROUP_MODERATOR},

View file

@ -1,4 +1,5 @@
Subject: لقد وصلت رسالة خاصة Subject: لقد وصلت رسالة خاصة
Charset: windows-1256
مرحبا {USERNAME}, مرحبا {USERNAME},

View file

@ -1,3 +1,5 @@
Charset: windows-1256
مرحبا {TO_USERNAME}, مرحبا {TO_USERNAME},
هذه الرسالة قد ارسلها {FROM_USERNAME} لحسابك في الموقع {SITENAME}. اذا كانت هذه الرسالة اعلانات, تحتوي على لغة بذيئة أو اي كلام غير ملائم الرجاء مراسلة مسؤول الموقع على العنوان التالي: هذه الرسالة قد ارسلها {FROM_USERNAME} لحسابك في الموقع {SITENAME}. اذا كانت هذه الرسالة اعلانات, تحتوي على لغة بذيئة أو اي كلام غير ملائم الرجاء مراسلة مسؤول الموقع على العنوان التالي:

View file

@ -1,4 +1,5 @@
Subject: التذكير بالردود على المواضيع - {TOPIC_TITLE} Subject: التذكير بالردود على المواضيع - {TOPIC_TITLE}
Charset: windows-1256
مرحبا {USERNAME}, مرحبا {USERNAME},

View file

@ -1,4 +1,5 @@
Subject: v Subject: v
Charset: windows-1256
ăŃÍČÇ {USERNAME}, ăŃÍČÇ {USERNAME},

View file

@ -1,4 +1,5 @@
Subject: New password activation Subject: New password activation
Charset: windows-1256
ãÑÍÈÇ {USERNAME} ãÑÍÈÇ {USERNAME}

View file

@ -1,4 +1,5 @@
Subject: أهلا وسهلا بكم في منتدى {SITENAME} Subject: أهلا وسهلا بكم في منتدى {SITENAME}
Charset: windows-1256
{WELCOME_MSG} {WELCOME_MSG}

View file

@ -1,4 +1,5 @@
Subject: أهلا وسهلا بكم في منتدى {SITENAME} Subject: أهلا وسهلا بكم في منتدى {SITENAME}
Charset: windows-1256
{WELCOME_MSG} {WELCOME_MSG}

View file

@ -1,9 +1,10 @@
Subject: Нов потребител Subject: Нов потребител
Charset: windows-1251
Здравейте!
Здравейте!
Потребителя "{USERNAME}" е бил деактивиран или създаден наскоро. Проверете детайлите за този потребител (ако е нужно) и го активирайте със следната връзка:
Потребителя "{USERNAME}" е бил деактивиран или създаден наскоро. Проверете детайлите за този потребител (ако е нужно) и го активирайте със следната връзка:
{U_ACTIVATE}
{U_ACTIVATE}
{EMAIL_SIG} {EMAIL_SIG}

View file

@ -1,8 +1,10 @@
Това е мейл, пратен от администратора на "{SITENAME}". Ако това съобщение е спам, съдържа неприлични или други коментари които вие намирате за обидни, моля свържете се с webmaster-а на следния е-мейл адрес: Charset: windows-1251
{BOARD_EMAIL} Това е мейл, пратен от администратора на "{SITENAME}". Ако това съобщение е спам, съдържа неприлични или други коментари които вие намирате за обидни, моля свържете се с webmaster-а на следния е-мейл адрес:
Съобщението пратено до вас: {BOARD_EMAIL}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Съобщението пратено до вас:
{MESSAGE} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
{MESSAGE}

View file

@ -1,7 +1,8 @@
Subject: Потребителя е активиран Subject: Потребителя е активиран
Charset: windows-1251
Здравейте {USERNAME}!
Здравейте {USERNAME}!
Вашия потребител "{SITENAME}" е вече активиран. Можете да го използвате с паролата която ви е пратена в предишния мейл.
Вашия потребител "{SITENAME}" е вече активиран. Можете да го използвате с паролата която ви е пратена в предишния мейл.
{EMAIL_SIG} {EMAIL_SIG}

View file

@ -1,18 +1,19 @@
Subject: Добре дошли на {SITENAME} Форумите Subject: Добре дошли на {SITENAME} Форумите
Charset: windows-1251
{WELCOME_MSG}
{WELCOME_MSG}
Моля запазете това писмо! То съдържа информацията за вашия потребител:
Моля запазете това писмо! То съдържа информацията за вашия потребител:
----------------------------
Потребител: {USERNAME} ----------------------------
Парола: {PASSWORD} Потребител: {USERNAME}
---------------------------- Парола: {PASSWORD}
----------------------------
Вашия потребител в момента е неактивен, ще трябва да изчакате администратора да го активира. Ще бъдете известени когато това стане (с друго писмо).
Вашия потребител в момента е неактивен, ще трябва да изчакате администратора да го активира. Ще бъдете известени когато това стане (с друго писмо).
Моля не забравайте вашата парола, защото тя е кодирана и ние не можем да ви я пратим. В случай че я забравите, можете да поискате нова, която ще ви бъде пратена по същия начин както тази.
Моля не забравайте вашата парола, защото тя е кодирана и ние не можем да ви я пратим. В случай че я забравите, можете да поискате нова, която ще ви бъде пратена по същия начин както тази.
Благодаря ви, че се регистрирахте!
Благодаря ви, че се регистрирахте!
{EMAIL_SIG} {EMAIL_SIG}

View file

@ -1,4 +1,5 @@
Subject: Добре дошли на {SITENAME} Форумите Subject: Добре дошли на {SITENAME} Форумите
Charset: windows-1251
{WELCOME_MSG} {WELCOME_MSG}

View file

@ -1,11 +1,12 @@
Subject: Приет сте за член на тази група Subject: Приет сте за член на тази група
Charset: windows-1251
Поздравления,
Поздравления,
Вие е сте добавен(а) в група "{GROUP_NAME}" на {SITENAME}.
Това е било направено от модератора на групата или администратора на сайта, свържете се с тях за повече информация. Вие е сте добавен(а) в група "{GROUP_NAME}" на {SITENAME}.
Това е било направено от модератора на групата или администратора на сайта, свържете се с тях за повече информация.
Можете да видите информацията за вашата група на следния адрес:
{U_GROUPCP} Можете да видите информацията за вашата група на следния адрес:
{U_GROUPCP}
{EMAIL_SIG}
{EMAIL_SIG}

View file

@ -1,10 +1,11 @@
Subject: Вашата кандидатура е одобрена Subject: Вашата кандидатура е одобрена
Charset: windows-1251
Поздравления,
Поздравления,
Вашата молба да се присъедините към групата "{GROUP_NAME}" на {SITENAME} е била одобрена.
Клинкнете на следната връзка за да получите повече информация за групата: Вашата молба да се присъедините към групата "{GROUP_NAME}" на {SITENAME} е била одобрена.
Клинкнете на следната връзка за да получите повече информация за групата:
{U_GROUPCP}
{U_GROUPCP}
{EMAIL_SIG}
{EMAIL_SIG}

View file

@ -1,10 +1,11 @@
Subject: Получена е заявка за приемане в групата ви Subject: Получена е заявка за приемане в групата ви
Charset: windows-1251
{GROUP_MODERATOR},
{GROUP_MODERATOR},
Потребител е помолил да се присъедини към вашата група на {SITENAME}.
За да приемете или отхвърлите молбата му, посетете следната връзка: Потребител е помолил да се присъедини към вашата група на {SITENAME}.
За да приемете или отхвърлите молбата му, посетете следната връзка:
{U_GROUPCP}
{U_GROUPCP}
{EMAIL_SIG}
{EMAIL_SIG}

View file

@ -1,10 +1,11 @@
Subject: Получихте ново лично съобщения Subject: Получихте ново лично съобщения
Charset: windows-1251
Здравейте {USERNAME}!
Здравейте {USERNAME}!
Получили сте лично събощение "{SITENAME}". Можете да видите вашето ново съобщение на:
Получили сте лично събощение "{SITENAME}". Можете да видите вашето ново съобщение на:
{U_INBOX}
{U_INBOX}
{EMAIL_SIG} {EMAIL_SIG}

View file

@ -1,10 +1,12 @@
Здравейте {TO_USERNAME}! Charset: windows-1251
Съобщението по-долу ви е пратено от {FROM_USERNAME} чрез вашия профил на {SITENAME}. Ако това съобщение е спам, съдържа неприлични или други коментари които вие намирате за обидни, моля свържете се с webmaster-а на следния е-мейл адрес: Здравейте {TO_USERNAME}!
{BOARD_EMAIL} Съобщението по-долу ви е пратено от {FROM_USERNAME} чрез вашия профил на {SITENAME}. Ако това съобщение е спам, съдържа неприлични или други коментари които вие намирате за обидни, моля свържете се с webmaster-а на следния е-мейл адрес:
Съобщението пратено до вас {BOARD_EMAIL}
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Съобщението пратено до вас
{MESSAGE} ~~~~~~~~~~~~~~~~~~~~~~~~~~~
{MESSAGE}

View file

@ -1,13 +1,14 @@
Subject: Уведемояване за отговори по темата - {TOPIC_TITLE} Subject: Уведемояване за отговори по темата - {TOPIC_TITLE}
Charset: windows-1251
Здравейте {USERNAME}!
Здравейте {USERNAME}!
Получавате този мейл, защото сте избрали да бъдете известявани за отговори на темата "{TOPIC_TITLE}" на {SITENAME}. На тази тема е било отговорено след последното ви посещение. Можете да видите отговорите на следващия адрес. Други известия няма да ви бъдат изпращани, докато не го посетите.
Получавате този мейл, защото сте избрали да бъдете известявани за отговори на темата "{TOPIC_TITLE}" на {SITENAME}. На тази тема е било отговорено след последното ви посещение. Можете да видите отговорите на следващия адрес. Други известия няма да ви бъдат изпращани, докато не го посетите.
{U_TOPIC}
{U_TOPIC}
Ако не искате да получавате повече известия, можете да промените настройките от самата темата или като кликнете на следния линк:
Ако не искате да получавате повече известия, можете да промените настройките от самата темата или като кликнете на следния линк:
{U_STOP_WATCHING_TOPIC}
{U_STOP_WATCHING_TOPIC}
{EMAIL_SIG} {EMAIL_SIG}

View file

@ -1,9 +1,10 @@
Subject: Ре-активирайте потребителя си! Subject: Ре-активирайте потребителя си!
Charset: windows-1251
Здравейте {USERNAME}!
Здравейте {USERNAME}!
Вашия потребител на "{SITENAME}" е деактивиран, най-вероятно в следствие от промяна на вашия профил. За да го активирате отново, посетете следния адрес:
Вашия потребител на "{SITENAME}" е деактивиран, най-вероятно в следствие от промяна на вашия профил. За да го активирате отново, посетете следния адрес:
{U_ACTIVATE}
{U_ACTIVATE}
{EMAIL_SIG} {EMAIL_SIG}

View file

@ -1,17 +1,18 @@
Subject: Активиране на нова парола Subject: Активиране на нова парола
Charset: windows-1251
Здравейте {USERNAME}!
Здравейте {USERNAME}!
Получавате този е-мейл защото вие (или някой който се прави на вас) е поискал да му(й) бъде пратена нова парола за {SITENAME}. Ако не сте подавали такава молба, не обръщайте внимание на съобщението, а ако продължавате да получавате такива съобщения, свържете се с администратора.
Получавате този е-мейл защото вие (или някой който се прави на вас) е поискал да му(й) бъде пратена нова парола за {SITENAME}. Ако не сте подавали такава молба, не обръщайте внимание на съобщението, а ако продължавате да получавате такива съобщения, свържете се с администратора.
За да използвате новата си парола трябва да я активирате. За да го направите, използвайте следната връзка:
За да използвате новата си парола трябва да я активирате. За да го направите, използвайте следната връзка:
{U_ACTIVATE}
{U_ACTIVATE}
След което би трябвало да можете да влезете със следната парола:
След което би трябвало да можете да влезете със следната парола:
Парола: {PASSWORD}
Парола: {PASSWORD}
Можете да промените паролата си от профила ви в {SITENAME}. Ако имате проблеми с това, моля свържете се с администратора.
Можете да промените паролата си от профила ви в {SITENAME}. Ако имате проблеми с това, моля свържете се с администратора.
{EMAIL_SIG} {EMAIL_SIG}

View file

@ -1,16 +1,17 @@
Subject: Добре дошли на {SITENAME} Форумите Subject: Добре дошли на {SITENAME} Форумите
Charset: windows-1251
{WELCOME_MSG}
{WELCOME_MSG}
Моля пазате този е-мейл. Той съдържа информацията за вашия потребител:
Моля пазате този е-мейл. Той съдържа информацията за вашия потребител:
----------------------------
Потребител: {USERNAME} ----------------------------
Парола: {PASSWORD} Потребител: {USERNAME}
---------------------------- Парола: {PASSWORD}
----------------------------
Моля не забравайте вашата парола, защото тя е кодирана и ние не можем да ви я пратим. Но в случай че я забравите, можете да поискате нова, която ще ви бъде пратена по същия начин като тази.
Моля не забравайте вашата парола, защото тя е кодирана и ние не можем да ви я пратим. Но в случай че я забравите, можете да поискате нова, която ще ви бъде пратена по същия начин като тази.
Благодарим ви, че се регистрирахте!
Благодарим ви, че се регистрирахте!
{EMAIL_SIG} {EMAIL_SIG}

View file

@ -1,20 +1,21 @@
Subject: Добре дошли на {SITENAME} Форумите Subject: Добре дошли на {SITENAME} Форумите
Charset: windows-1251
{WELCOME_MSG}
{WELCOME_MSG}
Моля пазете този мейл! Той съдържа информацията за вашия потребител.
Моля пазете този мейл! Той съдържа информацията за вашия потребител.
----------------------------
Потребител: {USERNAME} ----------------------------
Парола: {PASSWORD} Потребител: {USERNAME}
---------------------------- Парола: {PASSWORD}
----------------------------
Вашият потребител в момента е неактивен. Можете да го активирате като посетите следния адрес:
Вашият потребител в момента е неактивен. Можете да го активирате като посетите следния адрес:
{U_ACTIVATE}
{U_ACTIVATE}
Моля не забравайте вашата парола, защото тя е кодирана и ние не можем да ви я пратим. Но в случай че я забравите, можете да поискате нова, която ще ви бъде пратена по същия начин като тази.
Моля не забравайте вашата парола, защото тя е кодирана и ние не можем да ви я пратим. Но в случай че я забравите, можете да поискате нова, която ще ви бъде пратена по същия начин като тази.
Благодарим ви, че се регистрирахте!
Благодарим ви, че се регистрирахте!
{EMAIL_SIG} {EMAIL_SIG}

View file

@ -28,20 +28,6 @@
* email : boby@azholding.com * email : boby@azholding.com
****************************************************************************/ ****************************************************************************/
//
// The format of this file is:
//
// ---> $lang['message'] = "text";
//
// You should also try to set a locale and a character
// encoding (plus direction). The encoding and direction
// will be sent to the template. The locale may or may
// not work, it's dependent on OS support and the syntax
// varies ... give it your best guess!
//
setlocale(LC_ALL, "ru_RU.ISO-8859-5");
$lang['ENCODING'] = "windows-1251"; $lang['ENCODING'] = "windows-1251";
$lang['DIRECTION'] = "ltr"; $lang['DIRECTION'] = "ltr";
$lang['LEFT'] = "left"; $lang['LEFT'] = "left";

View file

@ -1,9 +1,10 @@
Subject: 新用户帐户 Subject: 新用户帐户
Charset: gb2312
您好,
您好,
这个 "{USERNAME}" 的帐号可能被冻结了或是刚完成注册程序. 如果有必要的话, 请检查这个用户的详细资料和使用以下链接激活这个帐号:
这个 "{USERNAME}" 的帐号可能被冻结了或是刚完成注册程序. 如果有必要的话, 请检查这个用户的详细资料和使用以下链接激活这个帐号:
{U_ACTIVATE}
{U_ACTIVATE}
{EMAIL_SIG} {EMAIL_SIG}

View file

@ -1,10 +1,12 @@
这封电子邮件是由"{SITENAME}"管理员寄出的. 假如这封电子邮件的内容令你感到不愉快, 甚至是恶意的攻击, 请使用以下链接提出申诉: Charset: gb2312
{BOARD_EMAIL} 这封电子邮件是由"{SITENAME}"管理员寄出的. 假如这封电子邮件的内容令你感到不愉快, 甚至是恶意的攻击, 请使用以下链接提出申诉:
包含完整的电子邮件(特别是头信息). {BOARD_EMAIL}
附带给你的讯息如下: 包含完整的电子邮件(特别是头信息).
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
附带给你的讯息如下:
{MESSAGE} ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
{MESSAGE}

View file

@ -1,7 +1,8 @@
Subject: 账户激活 Subject: 账户激活
Charset: gb2312
{USERNAME} 您好,
{USERNAME} 您好,
您在"{SITENAME}"的帐号已经激活, 您可以使用所收到的会员帐号及密码登入"{SITENAME}".
您在"{SITENAME}"的帐号已经激活, 您可以使用所收到的会员帐号及密码登入"{SITENAME}".
{EMAIL_SIG} {EMAIL_SIG}

View file

@ -1,18 +1,19 @@
Subject: 欢迎您访问 {SITENAME} 论坛 Subject: 欢迎您访问 {SITENAME} 论坛
Charset: gb2312
{WELCOME_MSG}
{WELCOME_MSG}
请妥善保留这封电子邮件. 您的帐号资料如下:
请妥善保留这封电子邮件. 您的帐号资料如下:
----------------------------
帐号: {USERNAME} ----------------------------
密码: {PASSWORD} 帐号: {USERNAME}
---------------------------- 密码: {PASSWORD}
----------------------------
您的帐号目前尚未激活, 系统管理员将为您开通帐号. 当您的账号激活后您将会收到一封确认邮件.
您的帐号目前尚未激活, 系统管理员将为您开通帐号. 当您的账号激活后您将会收到一封确认邮件.
请牢记您的密码, 由于所有密码均经过加密处理, 系统管理员也无法取得. 然而, 如果您忘记了密码, 系统将会寄发一个新的密码给您.
请牢记您的密码, 由于所有密码均经过加密处理, 系统管理员也无法取得. 然而, 如果您忘记了密码, 系统将会寄发一个新的密码给您.
感谢您的注册.
感谢您的注册.
{EMAIL_SIG} {EMAIL_SIG}

View file

@ -1,53 +1,54 @@
Subject: 欢迎您访问 {SITENAME} 论坛 Subject: 欢迎您访问 {SITENAME} 论坛
Charset: gb2312
{WELCOME_MSG}
{WELCOME_MSG}
依照"美国儿童网路隐私保护法"规定, 您的帐号尚未激活.
依照"美国儿童网路隐私保护法"规定, 您的帐号尚未激活.
请列印以下表格并请您的父母或监护人签上名字和日期,将其传真到:
请列印以下表格并请您的父母或监护人签上名字和日期,将其传真到:
{FAX_INFO}
{FAX_INFO}
或邮寄到:
或邮寄到:
{MAIL_INFO}
{MAIL_INFO}
------------------------------ 由此裁开 ------------------------------
{SITENAME} 会员注册申请 ------------------------------ 由此裁开 ------------------------------
{SITENAME} 会员注册申请
使用者名称: {USERNAME}
密码: {PASSWORD} 使用者名称: {USERNAME}
电子邮件: {EMAIL_ADDRESS} 密码: {PASSWORD}
电子邮件: {EMAIL_ADDRESS}
ICQ 编号: {ICQ}
AIM 位址: {AIM} ICQ 编号: {ICQ}
MSN 信使: {MSN} AIM 位址: {AIM}
雅虎即时通: {YIM} MSN 信使: {MSN}
个人首页: {WEB_SITE} 雅虎即时通: {YIM}
来自: {FROM} 个人首页: {WEB_SITE}
职业: {OCC} 来自: {FROM}
兴趣: {INTERESTS} 职业: {OCC}
兴趣: {INTERESTS}
我已看过保护儿童的条文并且允许"{SITENAME}"储存这些资讯.
我了解这些资讯可能在任何时候被键入密码更改. 我已看过保护儿童的条文并且允许"{SITENAME}"储存这些资讯.
我了解这些资料有可能在任何时候由"{SITENAME}"删除. 我了解这些资讯可能在任何时候被键入密码更改.
我了解这些资料有可能在任何时候由"{SITENAME}"删除.
家长或监护人
(请在此签名): _____________________ 家长或监护人
(请在此签名): _____________________
本人
(请在此签名): __________________ 本人
(请在此签名): __________________
日期: _______________
日期: _______________
------------------------------ 由此裁开------------------------------
------------------------------ 由此裁开------------------------------
当管理人员收到以上的申请传真或邮件并通过审核, 您的帐号才会被激活.
当管理人员收到以上的申请传真或邮件并通过审核, 您的帐号才会被激活.
请牢记您的密码, 由于所有密码均经过加密处理, 系统管理员也无法取得. 然而, 如果您忘记了密码, 系统将会寄发一个新的密码给您.
请牢记您的密码, 由于所有密码均经过加密处理, 系统管理员也无法取得. 然而, 如果您忘记了密码, 系统将会寄发一个新的密码给您.
感谢您的注册.
感谢您的注册.
{EMAIL_SIG} {EMAIL_SIG}

Some files were not shown because too many files have changed in this diff Show more