diff -crbB phpbb203/admin/admin_board.php phpbb206/admin/admin_board.php *** phpbb203/admin/admin_board.php Sun Jun 15 14:32:15 2003 --- phpbb206/admin/admin_board.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: admin_board.php,v 1.51.2.1 2002/05/12 00:47:39 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: admin_board.php,v 1.51.2.6 2003/06/10 00:37:12 psotfx Exp $ * * ***************************************************************************/ *************** *** 16,22 **** if( !empty($setmodules) ) { $file = basename(__FILE__); ! $module['General']['Configuration'] = "$file?mode=config"; return; } --- 16,22 ---- if( !empty($setmodules) ) { $file = basename(__FILE__); ! $module['General']['Configuration'] = "$file"; return; } *************** *** 47,52 **** --- 47,57 ---- $new[$config_name] = ( isset($HTTP_POST_VARS[$config_name]) ) ? $HTTP_POST_VARS[$config_name] : $default_config[$config_name]; + if ($config_name == 'cookie_name') + { + $cookie_name = str_replace('.', '_', $new['cookie_name']); + } + if( isset($HTTP_POST_VARS['submit']) ) { $sql = "UPDATE " . CONFIG_TABLE . " SET *************** *** 68,74 **** } $style_select = style_select($new['default_style'], 'default_style', "../templates"); ! $lang_select = language_select($new['default_lang'], 'default_lang', "../language"); $timezone_select = tz_select($new['board_timezone'], 'board_timezone'); $disable_board_yes = ( $new['board_disable'] ) ? "checked=\"checked\"" : ""; --- 73,79 ---- } $style_select = style_select($new['default_style'], 'default_style', "../templates"); ! $lang_select = language_select($new['default_lang'], 'default_lang', "language"); $timezone_select = tz_select($new['board_timezone'], 'board_timezone'); $disable_board_yes = ( $new['board_disable'] ) ? "checked=\"checked\"" : ""; *************** *** 242,247 **** --- 247,255 ---- "ACTIVATION_USER_CHECKED" => $activation_user, "ACTIVATION_ADMIN" => USER_ACTIVATION_ADMIN, "ACTIVATION_ADMIN_CHECKED" => $activation_admin, + "CONFIRM_ENABLE" => $confirm_yes, + "CONFIRM_DISABLE" => $confirm_no, + "ACTIVATION_NONE_CHECKED" => $activation_none, "BOARD_EMAIL_FORM_ENABLE" => $board_email_form_yes, "BOARD_EMAIL_FORM_DISABLE" => $board_email_form_no, "MAX_POLL_OPTIONS" => $new['max_poll_options'], diff -crbB phpbb203/admin/admin_db_utilities.php phpbb206/admin/admin_db_utilities.php *** phpbb203/admin/admin_db_utilities.php Sun Jun 15 14:32:15 2003 --- phpbb206/admin/admin_db_utilities.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: admin_db_utilities.php,v 1.42.2.5 2002/06/27 21:26:46 dougk_ff7 Exp $ * ****************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: admin_db_utilities.php,v 1.42.2.10 2003/03/04 21:02:19 acydburn Exp $ * ****************************************************************************/ *************** *** 34,49 **** { $filename = basename(__FILE__); $module['General']['Backup_DB'] = $filename . "?perform=backup"; - if(@phpversion() >= '4.0.0') - { - $file_uploads = @ini_get('file_uploads'); - } - else - { - $file_uploads = @get_cfg_var('file_uploads'); - } ! if( ($file_uploads != 0 || empty($file_uploads)) && (strtolower($file_uploads) != 'off') && (@phpversion() != '4.0.4pl1') ) { $module['General']['Restore_DB'] = $filename . "?perform=restore"; } --- 34,43 ---- { $filename = basename(__FILE__); $module['General']['Backup_DB'] = $filename . "?perform=backup"; ! $file_uploads = (@phpversion() >= '4.0.0') ? @ini_get('file_uploads') : @get_cfg_var('file_uploads'); ! ! if( (empty($file_uploads) || $file_uploads != 0) && (strtolower($file_uploads) != 'off') && (@phpversion() != '4.0.4pl1') ) { $module['General']['Restore_DB'] = $filename . "?perform=restore"; } *************** *** 572,628 **** function get_table_content_mysql($table, $handler) { global $db; - // - // Grab the data from the table. - // - $result = $db->sql_query("SELECT * FROM $table"); ! if (!$result) { message_die(GENERAL_ERROR, "Failed in get_table_content (select *)", "", __LINE__, __FILE__, "SELECT * FROM $table"); } - if($db->sql_numrows($result) > 0) - { - $schema_insert = "\n#\n# Table Data for $table\n#\n"; - } - else - { - $schema_insert = ""; - } - - $handler($schema_insert); - - // // Loop through the resulting rows and build the sql statement. ! // ! ! while ($row = $db->sql_fetchrow($result)) { ! $table_list = '('; ! $num_fields = $db->sql_numfields($result); ! // // Grab the list of field names. ! // for ($j = 0; $j < $num_fields; $j++) { ! $table_list .= $db->sql_fieldname($j, $result) . ', '; } - // - // Get rid of the last comma - // - $table_list = ereg_replace(', $', '', $table_list); $table_list .= ')'; ! // // Start building the SQL statement. - // $schema_insert = "INSERT INTO $table $table_list VALUES("; ! // // Loop through the rows and fill in data for each column - // for ($j = 0; $j < $num_fields; $j++) { ! if(!isset($row[$j])) { // // If there is no data for the column set it to null. --- 566,606 ---- function get_table_content_mysql($table, $handler) { global $db; ! // Grab the data from the table. ! if (!($result = $db->sql_query("SELECT * FROM $table"))) { message_die(GENERAL_ERROR, "Failed in get_table_content (select *)", "", __LINE__, __FILE__, "SELECT * FROM $table"); } // Loop through the resulting rows and build the sql statement. ! if ($row = $db->sql_fetchrow($result)) { ! $handler("\n#\n# Table Data for $table\n#\n"); ! $field_names = array(); ! // Grab the list of field names. ! $num_fields = $db->sql_numfields($result); ! $table_list = '('; for ($j = 0; $j < $num_fields; $j++) { ! $field_names[$j] = $db->sql_fieldname($j, $result); ! $table_list .= (($j > 0) ? ', ' : '') . $field_names[$j]; ! } $table_list .= ')'; ! ! do ! { // Start building the SQL statement. $schema_insert = "INSERT INTO $table $table_list VALUES("; ! // Loop through the rows and fill in data for each column for ($j = 0; $j < $num_fields; $j++) { ! $schema_insert .= ($j > 0) ? ', ' : ''; ! ! if(!isset($row[$field_names[$j]])) { // // If there is no data for the column set it to null. *************** *** 630,657 **** // sql file not to reimport if the last column was null in // any table. Should be fixed now :) JLH // ! $schema_insert .= ' NULL,'; } ! elseif ($row[$j] != '') { ! $schema_insert .= ' \'' . addslashes($row[$j]) . '\','; } else { ! $schema_insert .= '\'\','; } } ! // ! // Get rid of the the last comma. ! // ! $schema_insert = ereg_replace(',$', '', $schema_insert); $schema_insert .= ');'; ! // // Go ahead and send the insert statement to the handler function. - // $handler(trim($schema_insert)); } return(true); } --- 608,634 ---- // sql file not to reimport if the last column was null in // any table. Should be fixed now :) JLH // ! $schema_insert .= 'NULL'; } ! elseif ($row[$field_names[$j]] != '') { ! $schema_insert .= '\'' . addslashes($row[$field_names[$j]]) . '\''; } else { ! $schema_insert .= '\'\''; } } ! $schema_insert .= ');'; ! // Go ahead and send the insert statement to the handler function. $handler(trim($schema_insert)); } + while ($row = $db->sql_fetchrow($result)); + } + return(true); } *************** *** 681,701 **** { case 'backup': ! if( SQL_LAYER == 'oracle' || SQL_LAYER == 'odbc' || SQL_LAYER == 'mssql' ) ! { switch(SQL_LAYER) { case 'oracle': ! $db_type = "Oracle"; break; ! case 'odbc': ! $db_type = "ODBC"; break; case 'mssql': ! $db_type = "MSSQL"; break; } include('./page_header_admin.'.$phpEx); $template->set_filenames(array( --- 657,682 ---- { case 'backup': ! $error = false; switch(SQL_LAYER) { case 'oracle': ! $error = true; ! break; ! case 'db2': ! $error = true; break; ! case 'msaccess': ! $error = true; break; case 'mssql': ! case 'mssql-odbc': ! $error = true; break; } + if ($error) + { include('./page_header_admin.'.$phpEx); $template->set_filenames(array( *************** *** 709,715 **** $template->pparse("body"); ! break; } $tables = array('auth_access', 'banlist', 'categories', 'config', 'disallow', 'forums', 'forum_prune', 'groups', 'posts', 'posts_text', 'privmsgs', 'privmsgs_text', 'ranks', 'search_results', 'search_wordlist', 'search_wordmatch', 'sessions', 'smilies', 'themes', 'themes_name', 'topics', 'topics_watch', 'user_group', 'users', 'vote_desc', 'vote_results', 'vote_voters', 'words'); --- 690,696 ---- $template->pparse("body"); ! include('./page_footer_admin.'.$phpEx); } $tables = array('auth_access', 'banlist', 'categories', 'config', 'disallow', 'forums', 'forum_prune', 'groups', 'posts', 'posts_text', 'privmsgs', 'privmsgs_text', 'ranks', 'search_results', 'search_wordlist', 'search_wordmatch', 'sessions', 'smilies', 'themes', 'themes_name', 'topics', 'topics_watch', 'user_group', 'users', 'vote_desc', 'vote_results', 'vote_voters', 'words'); *************** *** 721,726 **** --- 701,708 ---- $gzipcompress = (!empty($HTTP_POST_VARS['gzipcompress'])) ? $HTTP_POST_VARS['gzipcompress'] : ( (!empty($HTTP_GET_VARS['gzipcompress'])) ? $HTTP_GET_VARS['gzipcompress'] : 0 ); + $drop = (!empty($HTTP_POST_VARS['drop'])) ? intval($HTTP_POST_VARS['drop']) : ( (!empty($HTTP_GET_VARS['drop'])) ? intval($HTTP_GET_VARS['drop']) : 0 ); + if(!empty($additional_tables)) { if(ereg(",", $additional_tables)) *************** *** 780,786 **** ); $template->assign_vars(array( ! "META" => "", "MESSAGE_TITLE" => $lang['Database_Utilities'] . " : " . $lang['Backup'], "MESSAGE_TEXT" => $lang['Backup_download']) --- 762,768 ---- ); $template->assign_vars(array( ! "META" => '', "MESSAGE_TITLE" => $lang['Database_Utilities'] . " : " . $lang['Backup'], "MESSAGE_TEXT" => $lang['Backup_download']) *************** *** 836,850 **** for($i = 0; $i < count($tables); $i++) { $table_name = $tables[$i]; ! if(SQL_LAYER != 'mysql4') ! { ! $table_def_function = "get_table_def_" . SQL_LAYER; ! $table_content_function = "get_table_content_" . SQL_LAYER; ! } ! else { $table_def_function = "get_table_def_mysql"; $table_content_function = "get_table_content_mysql"; } if($backup_type != 'data') --- 818,836 ---- for($i = 0; $i < count($tables); $i++) { $table_name = $tables[$i]; ! ! switch (SQL_LAYER) { + case 'postgresql': + $table_def_function = "get_table_def_postgresql"; + $table_content_function = "get_table_content_postgresql"; + break; + + case 'mysql': + case 'mysql4': $table_def_function = "get_table_def_mysql"; $table_content_function = "get_table_content_mysql"; + break; } if($backup_type != 'data') *************** *** 872,878 **** break; case 'restore': ! if(!isset($restore_start)) { // // Define Template files... --- 858,864 ---- break; case 'restore': ! if(!isset($HTTP_POST_VARS['restore_start'])) { // // Define Template files... *************** *** 919,925 **** // a hackers attempt at getting us to process a local system // file. // ! if( file_exists($backup_file_tmpname) ) { if( preg_match("/^(text\/[a-zA-Z]+)|(application\/(x\-)?gzip(\-compressed)?)|(application\/octet-stream)$/is", $backup_file_type) ) { --- 905,911 ---- // a hackers attempt at getting us to process a local system // file. // ! if( file_exists(phpbb_realpath($backup_file_tmpname)) ) { if( preg_match("/^(text\/[a-zA-Z]+)|(application\/(x\-)?gzip(\-compressed)?)|(application\/octet-stream)$/is", $backup_file_type) ) { diff -crbB phpbb203/admin/admin_disallow.php phpbb206/admin/admin_disallow.php *** phpbb203/admin/admin_disallow.php Sun Jun 15 14:32:15 2003 --- phpbb206/admin/admin_disallow.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: admin_disallow.php,v 1.9.2.1 2002/05/12 00:47:40 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: admin_disallow.php,v 1.9.2.2 2002/11/26 11:42:11 psotfx Exp $ * * ***************************************************************************/ *************** *** 41,48 **** { 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']; if( !validate_username($disallowed_user) ) { $message = $lang['Disallowed_already']; --- 41,52 ---- { include($phpbb_root_path . 'includes/functions_validate.'.$phpEx); ! $disallowed_user = ( isset($HTTP_POST_VARS['disallowed_user']) ) ? trim($HTTP_POST_VARS['disallowed_user']) : trim($HTTP_GET_VARS['disallowed_user']); + if ($disallowed_user == '') + { + message_die(MESSAGE, $lang['Fields_empty']); + } if( !validate_username($disallowed_user) ) { $message = $lang['Disallowed_already']; diff -crbB phpbb203/admin/admin_forum_prune.php phpbb206/admin/admin_forum_prune.php *** phpbb203/admin/admin_forum_prune.php Sun Jun 15 14:32:15 2003 --- phpbb206/admin/admin_forum_prune.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: admin_forum_prune.php,v 1.22.2.2 2002/05/12 15:57:44 psotfx Exp $ * ****************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: admin_forum_prune.php,v 1.22.2.3 2002/12/18 14:14:07 psotfx Exp $ * ****************************************************************************/ *************** *** 168,176 **** $forum_name = ( $forum_id == -1 ) ? $lang['All_Forums'] : $forum_rows[0]['forum_name']; $prune_data = $lang['Prune_topics_not_posted'] . " "; ! $prune_data .= ' ' . $lang['Days']; ! $hidden_input = ''; // // Assign the template variables. --- 168,176 ---- $forum_name = ( $forum_id == -1 ) ? $lang['All_Forums'] : $forum_rows[0]['forum_name']; $prune_data = $lang['Prune_topics_not_posted'] . " "; ! $prune_data .= ' ' . $lang['Days']; ! $hidden_input = ''; // // Assign the template variables. diff -crbB phpbb203/admin/admin_forums.php phpbb206/admin/admin_forums.php *** phpbb203/admin/admin_forums.php Sun Jun 15 14:32:15 2003 --- phpbb206/admin/admin_forums.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: admin_forums.php,v 1.40.2.3 2002/07/19 14:10:06 psotfx Exp $ * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: admin_forums.php,v 1.40.2.10 2003/01/05 02:36:00 psotfx Exp $ * ***************************************************************************/ *************** *** 43,49 **** "auth_reply" => AUTH_ALL, "auth_edit" => AUTH_REG, "auth_delete" => AUTH_REG, ! "auth_sticky" => AUTH_REG, "auth_announce" => AUTH_MOD, "auth_vote" => AUTH_REG, "auth_pollcreate" => AUTH_REG --- 43,49 ---- "auth_reply" => AUTH_ALL, "auth_edit" => AUTH_REG, "auth_delete" => AUTH_REG, ! "auth_sticky" => AUTH_MOD, "auth_announce" => AUTH_MOD, "auth_vote" => AUTH_REG, "auth_pollcreate" => AUTH_REG *************** *** 301,306 **** --- 301,312 ---- $catlist = get_list('category', $cat_id, TRUE); $forumstatus == ( FORUM_LOCKED ) ? $forumlocked = "selected=\"selected\"" : $forumunlocked = "selected=\"selected\""; + + // These two options ($lang['Status_unlocked'] and $lang['Status_locked']) seem to be missing from + // the language files. + $lang['Status_unlocked'] = isset($lang['Status_unlocked']) ? $lang['Status_unlocked'] : 'Unlocked'; + $lang['Status_locked'] = isset($lang['Status_locked']) ? $lang['Status_locked'] : 'Locked'; + $statuslist = "\n"; $statuslist .= "\n"; *************** *** 604,611 **** // Either delete or move all posts in a forum if($to_id == -1) { include($phpbb_root_path . "includes/prune.$phpEx"); ! prune($from_id, 0); // Delete everything from forum } else { --- 609,649 ---- // Either delete or move all posts in a forum if($to_id == -1) { + // Delete polls in this forum + $sql = "SELECT v.vote_id + FROM " . VOTE_DESC_TABLE . " v, " . TOPICS_TABLE . " t + WHERE t.forum_id = $from_id + AND v.topic_id = t.topic_id"; + if (!($result = $db->sql_query($sql))) + { + message_die(GENERAL_ERROR, "Couldn't obtain list of vote ids", "", __LINE__, __FILE__, $sql); + } + + if ($row = $db->sql_fetchrow($result)) + { + $vote_ids = ''; + do + { + $vote_ids = (($vote_ids != '') ? ', ' : '') . $row['vote_id']; + } + while ($row = $db->sql_fetchrow($result)); + + $sql = "DELETE FROM " . VOTE_DESC_TABLE . " + WHERE vote_id IN ($vote_ids)"; + $db->sql_query($sql); + + $sql = "DELETE FROM " . VOTE_RESULTS_TABLE . " + WHERE vote_id IN ($vote_ids)"; + $db->sql_query($sql); + + $sql = "DELETE FROM " . VOTE_USERS_TABLE . " + WHERE vote_id IN ($vote_ids)"; + $db->sql_query($sql); + } + $db->sql_freeresult($result); + include($phpbb_root_path . "includes/prune.$phpEx"); ! prune($from_id, 0, true); // Delete everything from forum } else { *************** *** 637,642 **** --- 676,732 ---- sync('forum', $to_id); } + // Alter Mod level if appropriate - 2.0.4 + $sql = "SELECT ug.user_id + FROM " . AUTH_ACCESS_TABLE . " a, " . USER_GROUP_TABLE . " ug + WHERE a.forum_id <> $from_id + AND a.auth_mod = 1 + AND ug.group_id = a.group_id"; + if( !$result = $db->sql_query($sql) ) + { + message_die(GENERAL_ERROR, "Couldn't obtain moderator list", "", __LINE__, __FILE__, $sql); + } + + if ($row = $db->sql_fetchrow($result)) + { + $user_ids = ''; + do + { + $user_ids .= (($user_ids != '') ? ', ' : '' ) . $row['user_id']; + } + while ($row = $db->sql_fetchrow($result)); + + $sql = "SELECT ug.user_id + FROM " . AUTH_ACCESS_TABLE . " a, " . USER_GROUP_TABLE . " ug + WHERE a.forum_id = $from_id + AND a.auth_mod = 1 + AND ug.group_id = a.group_id + AND ug.user_id NOT IN ($user_ids)"; + if( !$result2 = $db->sql_query($sql) ) + { + message_die(GENERAL_ERROR, "Couldn't obtain moderator list", "", __LINE__, __FILE__, $sql); + } + + if ($row = $db->sql_fetchrow($result2)) + { + $user_ids = ''; + do + { + $user_ids .= (($user_ids != '') ? ', ' : '' ) . $row['user_id']; + } + while ($row = $db->sql_fetchrow($result2)); + + $sql = "UPDATE " . USERS_TABLE . " + SET user_level = " . USER . " + WHERE user_id IN ($user_ids) + AND user_level <> " . ADMIN; + $db->sql_query($sql); + } + $db->sql_freeresult($result); + + } + $db->sql_freeresult($result2); + $sql = "DELETE FROM " . FORUMS_TABLE . " WHERE forum_id = $from_id"; if( !$result = $db->sql_query($sql) ) diff -crbB phpbb203/admin/admin_groups.php phpbb206/admin/admin_groups.php *** phpbb203/admin/admin_groups.php Sun Jun 15 14:32:15 2003 --- phpbb206/admin/admin_groups.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: admin_groups.php,v 1.25.2.5 2002/07/31 19:14:46 dougk_ff7 Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: admin_groups.php,v 1.25.2.8 2003/05/17 17:32:18 acydburn Exp $ * * ***************************************************************************/ *************** *** 43,49 **** } else { ! $group_id = ''; } if ( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) ) --- 43,49 ---- } else { ! $group_id = 0; } if ( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) ) *************** *** 171,176 **** --- 171,226 ---- // if ( isset($HTTP_POST_VARS['group_delete']) ) { + // + // Reset User Moderator Level + // + + // Is Group moderating a forum ? + $sql = "SELECT auth_mod FROM " . AUTH_ACCESS_TABLE . " + WHERE group_id = " . $group_id; + if ( !($result = $db->sql_query($sql)) ) + { + message_die(GENERAL_ERROR, 'Could not select auth_access', '', __LINE__, __FILE__, $sql); + } + + $row = $db->sql_fetchrow($result); + if (intval($row['auth_mod']) == 1) + { + // Yes, get the assigned users and update their Permission if they are no longer moderator of one of the forums + $sql = "SELECT user_id FROM " . USER_GROUP_TABLE . " + WHERE group_id = " . $group_id; + if ( !($result = $db->sql_query($sql)) ) + { + message_die(GENERAL_ERROR, 'Could not select user_group', '', __LINE__, __FILE__, $sql); + } + + $rows = $db->sql_fetchrowset($result); + for ($i = 0; $i < count($rows); $i++) + { + $sql = "SELECT g.group_id FROM " . AUTH_ACCESS_TABLE . " a, " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug + WHERE (a.auth_mod = 1) AND (g.group_id = a.group_id) AND (a.group_id = ug.group_id) AND (g.group_id = ug.group_id) + AND (ug.user_id = " . intval($rows[$i]['user_id']) . ") AND (ug.group_id <> " . $group_id . ")"; + if ( !($result = $db->sql_query($sql)) ) + { + message_die(GENERAL_ERROR, 'Could not obtain moderator permissions', '', __LINE__, __FILE__, $sql); + } + + if ($db->sql_numrows($result) == 0) + { + $sql = "UPDATE " . USERS_TABLE . " SET user_level = " . USER . " + WHERE user_level = " . MOD . " AND user_id = " . intval($rows[$i]['user_id']); + + if ( !$db->sql_query($sql) ) + { + message_die(GENERAL_ERROR, 'Could not update moderator permissions', '', __LINE__, __FILE__, $sql); + } + } + } + } + + // + // Delete Group + // $sql = "DELETE FROM " . GROUPS_TABLE . " WHERE group_id = " . $group_id; if ( !$db->sql_query($sql) ) *************** *** 213,219 **** message_die(GENERAL_MESSAGE, $lang['No_group_moderator']); } ! $this_userdata = get_userdata($group_moderator); $group_moderator = $this_userdata['user_id']; if ( !$group_moderator ) --- 263,269 ---- message_die(GENERAL_MESSAGE, $lang['No_group_moderator']); } ! $this_userdata = get_userdata($group_moderator, true); $group_moderator = $this_userdata['user_id']; if ( !$group_moderator ) diff -crbB phpbb203/admin/admin_mass_email.php phpbb206/admin/admin_mass_email.php *** phpbb203/admin/admin_mass_email.php Sun Jun 15 14:32:15 2003 --- phpbb206/admin/admin_mass_email.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: admin_mass_email.php,v 1.15.2.5 2002/05/20 00:52:18 psotfx Exp $ * ****************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: admin_mass_email.php,v 1.15.2.7 2003/05/03 23:24:01 acydburn Exp $ * ****************************************************************************/ *************** *** 79,88 **** if ( $row = $db->sql_fetchrow($result) ) { ! $bcc_list = ''; do { ! $bcc_list .= ( ( $bcc_list != '' ) ? ', ' : '' ) . $row['user_email']; } while ( $row = $db->sql_fetchrow($result) ); --- 79,88 ---- if ( $row = $db->sql_fetchrow($result) ) { ! $bcc_list = array(); do { ! $bcc_list[] = $row['user_email']; } while ( $row = $db->sql_fetchrow($result) ); *************** *** 116,127 **** $emailer = new emailer($board_config['smtp_delivery']); ! $email_headers = 'Return-Path: ' . $userdata['board_email'] . "\nFrom: " . $board_config['board_email'] . "\n"; ! $email_headers .= 'X-AntiAbuse: Board servername - ' . $board_config['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) . "\n"; - $email_headers .= "Bcc: $bcc_list\n"; $emailer->use_template('admin_send_email'); $emailer->email_address($board_config['board_email']); --- 116,133 ---- $emailer = new emailer($board_config['smtp_delivery']); ! $emailer->from($board_config['board_email']); ! $emailer->replyto($board_config['board_email']); ! ! for ($i = 0; $i < count($bcc_list); $i++) ! { ! $emailer->bcc($bcc_list[$i]); ! } ! ! $email_headers = 'X-AntiAbuse: Board servername - ' . $board_config['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) . "\n"; $emailer->use_template('admin_send_email'); $emailer->email_address($board_config['board_email']); diff -crbB phpbb203/admin/admin_ranks.php phpbb206/admin/admin_ranks.php *** phpbb203/admin/admin_ranks.php Sun Jun 15 14:32:15 2003 --- phpbb206/admin/admin_ranks.php Sun Jul 20 16:37:22 2003 *************** *** 6,13 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: admin_ranks.php,v 1.13.2.2 2002/05/12 15:57:44 psotfx Exp $ ! * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: admin_ranks.php,v 1.13.2.3 2002/11/28 00:11:39 psotfx Exp $ * ***************************************************************************/ *************** *** 162,169 **** } } ! if( $rank_id ) { $sql = "UPDATE " . RANKS_TABLE . " SET rank_title = '" . str_replace("\'", "''", $rank_title) . "', rank_special = $special_rank, rank_min = $min_posts, rank_image = '" . str_replace("\'", "''", $rank_image) . "' WHERE rank_id = $rank_id"; --- 161,179 ---- } } ! if ($rank_id) ! { ! if (!$special_rank) ! { ! $sql = "UPDATE " . USERS_TABLE . " ! SET user_rank = 0 ! WHERE user_rank = $rank_id"; ! ! if( !$result = $db->sql_query($sql) ) { + message_die(GENERAL_ERROR, $lang['No_update_ranks'], "", __LINE__, __FILE__, $sql); + } + } $sql = "UPDATE " . RANKS_TABLE . " SET rank_title = '" . str_replace("\'", "''", $rank_title) . "', rank_special = $special_rank, rank_min = $min_posts, rank_image = '" . str_replace("\'", "''", $rank_image) . "' WHERE rank_id = $rank_id"; diff -crbB phpbb203/admin/admin_smilies.php phpbb206/admin/admin_smilies.php *** phpbb203/admin/admin_smilies.php Sun Jun 15 14:32:15 2003 --- phpbb206/admin/admin_smilies.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: admin_smilies.php,v 1.22.2.5 2002/07/19 14:10:07 psotfx Exp $ * ****************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: admin_smilies.php,v 1.22.2.12 2002/12/22 15:34:01 psotfx Exp $ * ****************************************************************************/ *************** *** 72,78 **** while($file = @readdir($dir)) { ! if( !@is_dir($phpbb_root_path . $board_config['smilies_path'] . '/' . $file) ) { $img_size = @getimagesize($phpbb_root_path . $board_config['smilies_path'] . '/' . $file); --- 72,78 ---- while($file = @readdir($dir)) { ! if( !@is_dir(phpbb_realpath($phpbb_root_path . $board_config['smilies_path'] . '/' . $file)) ) { $img_size = @getimagesize($phpbb_root_path . $board_config['smilies_path'] . '/' . $file); *************** *** 239,245 **** FROM " . SMILIES_TABLE; if( !$result = $db->sql_query($sql) ) { ! message_die(GENERAL_ERROR, "Couldn't delete smiley", "", __LINE__, __FILE__, $sql); } $resultset = $db->sql_fetchrowset($result); --- 239,245 ---- FROM " . SMILIES_TABLE; if( !$result = $db->sql_query($sql) ) { ! message_die(GENERAL_ERROR, "Could not get smiley list", "", __LINE__, __FILE__, $sql); } $resultset = $db->sql_fetchrowset($result); *************** *** 399,408 **** // Get the submitted data, being careful to ensure that we only // accept the data we are looking for. // ! $smile_code = ( isset($HTTP_POST_VARS['smile_code']) ) ? $HTTP_POST_VARS['smile_code'] : $HTTP_GET_VARS['smile_code']; ! $smile_url = ( isset($HTTP_POST_VARS['smile_url']) ) ? $HTTP_POST_VARS['smile_url'] : $HTTP_GET_VARS['smile_url']; ! $smile_emotion = ( isset($HTTP_POST_VARS['smile_emotion']) ) ? $HTTP_POST_VARS['smile_emotion'] : $HTTP_GET_VARS['smile_emotion']; $smile_id = ( isset($HTTP_POST_VARS['smile_id']) ) ? intval($HTTP_POST_VARS['smile_id']) : intval($HTTP_GET_VARS['smile_id']); // // Convert < and > to proper htmlentities for parsing. // --- 399,415 ---- // Get the submitted data, being careful to ensure that we only // accept the data we are looking for. // ! $smile_code = ( isset($HTTP_POST_VARS['smile_code']) ) ? trim($HTTP_POST_VARS['smile_code']) : trim($HTTP_GET_VARS['smile_code']); ! $smile_url = ( isset($HTTP_POST_VARS['smile_url']) ) ? trim($HTTP_POST_VARS['smile_url']) : trim($HTTP_GET_VARS['smile_url']); ! $smile_emotion = ( isset($HTTP_POST_VARS['smile_emotion']) ) ? trim($HTTP_POST_VARS['smile_emotion']) : trim($HTTP_GET_VARS['smile_emotion']); $smile_id = ( isset($HTTP_POST_VARS['smile_id']) ) ? intval($HTTP_POST_VARS['smile_id']) : intval($HTTP_GET_VARS['smile_id']); + + // If no code was entered complain ... + if ($smile_code == '' || $smile_url == '') + { + message_die(MESSAGE, $lang['Fields_empty']); + } + // // Convert < and > to proper htmlentities for parsing. // *************** *** 415,422 **** $sql = "UPDATE " . SMILIES_TABLE . " SET code = '" . str_replace("\'", "''", $smile_code) . "', smile_url = '" . str_replace("\'", "''", $smile_url) . "', emoticon = '" . str_replace("\'", "''", $smile_emotion) . "' WHERE smilies_id = $smile_id"; ! $result = $db->sql_query($sql); ! if( !$result ) { message_die(GENERAL_ERROR, "Couldn't update smilies info", "", __LINE__, __FILE__, $sql); } --- 422,428 ---- $sql = "UPDATE " . SMILIES_TABLE . " SET code = '" . str_replace("\'", "''", $smile_code) . "', smile_url = '" . str_replace("\'", "''", $smile_url) . "', emoticon = '" . str_replace("\'", "''", $smile_emotion) . "' WHERE smilies_id = $smile_id"; ! if( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, "Couldn't update smilies info", "", __LINE__, __FILE__, $sql); } *************** *** 439,444 **** --- 445,456 ---- $smile_url = ( isset($HTTP_POST_VARS['smile_url']) ) ? $HTTP_POST_VARS['smile_url'] : $HTTP_GET_VARS['smile_url']; $smile_emotion = ( isset($HTTP_POST_VARS['smile_emotion']) ) ? $HTTP_POST_VARS['smile_emotion'] : $HTTP_GET_VARS['smile_emotion']; + // If no code was entered complain ... + if ($smile_code == '' || $smile_url == '') + { + message_die(MESSAGE, $lang['Fields_empty']); + } + // // Convert < and > to proper htmlentities for parsing. // diff -crbB phpbb203/admin/admin_styles.php phpbb206/admin/admin_styles.php *** phpbb203/admin/admin_styles.php Sun Jun 15 14:32:15 2003 --- phpbb206/admin/admin_styles.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: admin_styles.php,v 1.27.2.3 2002/05/13 13:18:17 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: admin_styles.php,v 1.27.2.11 2003/06/26 00:08:17 psotfx Exp $ * * ***************************************************************************/ *************** *** 39,60 **** // Check if the user has cancled a confirmation message. // $phpbb_root_path = "./../"; $confirm = ( isset($HTTP_POST_VARS['confirm']) ) ? TRUE : FALSE; $cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : FALSE; ! if( empty($HTTP_POST_VARS['send_file']) ) ! { ! $no_page_header = ( $cancel ) ? TRUE : FALSE; ! require($phpbb_root_path . 'extension.inc'); ! require('./pagestart.' . $phpEx); ! } ! if( $cancel ) { ! $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']) ) --- 39,56 ---- // Check if the user has cancled a confirmation message. // $phpbb_root_path = "./../"; + require($phpbb_root_path . 'extension.inc'); $confirm = ( isset($HTTP_POST_VARS['confirm']) ) ? TRUE : FALSE; $cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : FALSE; ! $no_page_header = (!empty($HTTP_POST_VARS['send_file']) || $cancel) ? TRUE : FALSE; ! ! require('./pagestart.' . $phpEx); ! if ($cancel) { ! redirect('admin/' . append_sid("admin_styles.$phpEx", true)); } if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) *************** *** 134,142 **** { while( $sub_dir = @readdir($dir) ) { ! if( !is_file($phpbb_root_path . 'templates/' .$sub_dir) && !is_link($phpbb_root_path . 'templates/' .$sub_dir) && $sub_dir != "." && $sub_dir != ".." && $sub_dir != "CVS" ) { ! if( @file_exists($phpbb_root_path. "templates/" . $sub_dir . "/theme_info.cfg") ) { include($phpbb_root_path. "templates/" . $sub_dir . "/theme_info.cfg"); --- 130,138 ---- { while( $sub_dir = @readdir($dir) ) { ! if( !is_file(phpbb_realpath($phpbb_root_path . 'templates/' .$sub_dir)) && !is_link(phpbb_realpath($phpbb_root_path . 'templates/' .$sub_dir)) && $sub_dir != "." && $sub_dir != ".." && $sub_dir != "CVS" ) { ! if( @file_exists(@phpbb_realpath($phpbb_root_path. "templates/" . $sub_dir . "/theme_info.cfg")) ) { include($phpbb_root_path. "templates/" . $sub_dir . "/theme_info.cfg"); *************** *** 551,557 **** $s_template_select = ''; while( $file = @readdir($dir) ) { ! if( !is_file(phpbb_realpath($phpbb_root_path . 'templates/' . $file)) && !is_link(phpbb_realpath($phpbb_root_path . 'templates/' . $file)) && $file != "." && $file != ".." && $file != "CVS" ) { if($file == $selected['template_name']) { *************** *** 750,756 **** $s_hidden_fields = ''; $s_hidden_fields .= ''; ! $download_form = '
' . $s_hidden_fields; $template->set_filenames(array( "body" => "message_body.tpl") --- 746,752 ---- $s_hidden_fields = ''; $s_hidden_fields .= ''; ! $download_form = '' . $s_hidden_fields; $template->set_filenames(array( "body" => "message_body.tpl") *************** *** 792,798 **** $s_template_select = ''; while( $file = @readdir($dir) ) { ! if( !is_file(phpbb_realpath($phpbb_root_path . 'templates/' . $file)) && !is_link(phpbb_realpath($phpbb_root_path . 'templates/' .$file)) && $file != "." && $file != ".." && $file != "CVS" ) { $s_template_select .= '\n"; } *************** *** 932,938 **** break; } ! if( !$HTTP_POST_VARS['send_file'] ) { include('./page_footer_admin.'.$phpEx); } --- 928,934 ---- break; } ! if (empty($HTTP_POST_VARS['send_file'])) { include('./page_footer_admin.'.$phpEx); } diff -crbB phpbb203/admin/admin_ug_auth.php phpbb206/admin/admin_ug_auth.php *** phpbb203/admin/admin_ug_auth.php Sun Jun 15 14:32:15 2003 --- phpbb206/admin/admin_ug_auth.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: admin_ug_auth.php,v 1.13.2.2 2002/05/12 15:57:44 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: admin_ug_auth.php,v 1.13.2.4 2003/05/17 17:32:19 acydburn Exp $ * * ***************************************************************************/ *************** *** 54,59 **** --- 54,62 ---- } } + $user_id = intval($user_id); + $group_id = intval($group_id); + // // Start program - define vars // *************** *** 510,516 **** { if ( isset($HTTP_POST_VARS['username']) ) { ! $this_userdata = get_userdata($HTTP_POST_VARS['username']); if ( !is_array($this_userdata) ) { message_die(GENERAL_MESSAGE, $lang['No_such_user']); --- 513,519 ---- { if ( isset($HTTP_POST_VARS['username']) ) { ! $this_userdata = get_userdata($HTTP_POST_VARS['username'], true); if ( !is_array($this_userdata) ) { message_die(GENERAL_MESSAGE, $lang['No_such_user']); diff -crbB phpbb203/admin/admin_user_ban.php phpbb206/admin/admin_user_ban.php *** phpbb203/admin/admin_user_ban.php Sun Jun 15 14:32:15 2003 --- phpbb206/admin/admin_user_ban.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: admin_user_ban.php,v 1.21.2.2 2002/05/12 15:57:45 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: admin_user_ban.php,v 1.21.2.4 2003/03/31 06:56:30 acydburn Exp $ * * ***************************************************************************/ *************** *** 49,55 **** $user_list = array(); if ( !empty($HTTP_POST_VARS['username']) ) { ! $this_userdata = get_userdata($HTTP_POST_VARS['username']); if( !$this_userdata ) { message_die(GENERAL_MESSAGE, $lang['No_user_id_specified'] ); --- 49,55 ---- $user_list = array(); if ( !empty($HTTP_POST_VARS['username']) ) { ! $this_userdata = get_userdata($HTTP_POST_VARS['username'], true); if( !$this_userdata ) { message_die(GENERAL_MESSAGE, $lang['No_user_id_specified'] ); *************** *** 155,161 **** // contained in the annotated php manual at php.com (ereg // section) // ! if ( eregi('^(([[:alnum:]\*]+([-_.][[:alnum:]\*]+)*\.?)|(\*))@([[:alnum:]]+([-_]?[[:alnum:]]+)*\.){1,3}([[:alnum:]]{2,6})$', trim($email_list_temp[$i])) ) { $email_list[] = trim($email_list_temp[$i]); } --- 155,161 ---- // contained in the annotated php manual at php.com (ereg // section) // ! if (preg_match('#^(([a-z0-9&.-_+])|(\*))+@[a-z0-9\-]+\.([a-z0-9\-]+\.)*?[a-z]+$#is', trim($email_list_temp[$i]))) { $email_list[] = trim($email_list_temp[$i]); } diff -crbB phpbb203/admin/admin_users.php phpbb206/admin/admin_users.php *** phpbb203/admin/admin_users.php Sun Jun 15 14:32:15 2003 --- phpbb206/admin/admin_users.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: admin_users.php,v 1.57.2.6 2002/06/27 22:54:09 dougk_ff7 Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: admin_users.php,v 1.57.2.25 2003/06/20 07:40:27 acydburn Exp $ * * ***************************************************************************/ *************** *** 30,36 **** return; } ! $phpbb_root_path = "./../"; require($phpbb_root_path . 'extension.inc'); require('./pagestart.' . $phpEx); require($phpbb_root_path . 'includes/bbcode.'.$phpEx); --- 30,36 ---- return; } ! $phpbb_root_path = './../'; require($phpbb_root_path . 'extension.inc'); require('./pagestart.' . $phpEx); require($phpbb_root_path . 'includes/bbcode.'.$phpEx); *************** *** 38,43 **** --- 38,46 ---- require($phpbb_root_path . 'includes/functions_selects.'.$phpEx); require($phpbb_root_path . 'includes/functions_validate.'.$phpEx); + $html_entities_match = array('#<#', '#>#'); + $html_entities_replace = array('<', '>'); + // // Set mode // *************** *** 53,74 **** // // Begin program // ! if( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) || isset($HTTP_GET_VARS[POST_USERS_URL]) || isset( $HTTP_POST_VARS[POST_USERS_URL]) ) ) { // // Ok, the profile has been modified and submitted, let's update // ! if( ( $mode == 'save' && isset( $HTTP_POST_VARS['submit'] ) ) || isset( $HTTP_POST_VARS['avatargallery'] ) || isset( $HTTP_POST_VARS['submitavatar'] ) || isset( $HTTP_POST_VARS['cancelavatar'] ) ) { ! $user_id = intval( $HTTP_POST_VARS['id'] ); ! $this_userdata = get_userdata($user_id); ! if( !$this_userdata ) { message_die(GENERAL_MESSAGE, $lang['No_user_id_specified'] ); } ! $username = ( !empty($HTTP_POST_VARS['username']) ) ? trim(strip_tags( $HTTP_POST_VARS['username'] ) ) : ''; $email = ( !empty($HTTP_POST_VARS['email']) ) ? trim(strip_tags(htmlspecialchars( $HTTP_POST_VARS['email'] ) )) : ''; $password = ( !empty($HTTP_POST_VARS['password']) ) ? trim(strip_tags(htmlspecialchars( $HTTP_POST_VARS['password'] ) )) : ''; --- 56,222 ---- // // Begin program // ! if ( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) || isset($HTTP_GET_VARS[POST_USERS_URL]) || isset( $HTTP_POST_VARS[POST_USERS_URL]) ) ) { // // Ok, the profile has been modified and submitted, let's update // ! if ( ( $mode == 'save' && isset( $HTTP_POST_VARS['submit'] ) ) || isset( $HTTP_POST_VARS['avatargallery'] ) || isset( $HTTP_POST_VARS['submitavatar'] ) || isset( $HTTP_POST_VARS['cancelavatar'] ) ) { ! $user_id = intval($HTTP_POST_VARS['id']); ! if (!($this_userdata = get_userdata($user_id))) { message_die(GENERAL_MESSAGE, $lang['No_user_id_specified'] ); } ! if( $HTTP_POST_VARS['deleteuser'] ) ! { ! $sql = "SELECT g.group_id ! FROM " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g ! WHERE ug.user_id = $user_id ! AND g.group_id = ug.group_id ! AND g.group_single_user = 1"; ! if( !($result = $db->sql_query($sql)) ) ! { ! message_die(GENERAL_ERROR, 'Could not obtain group information for this user', '', __LINE__, __FILE__, $sql); ! } ! ! $row = $db->sql_fetchrow($result); ! ! $sql = "UPDATE " . POSTS_TABLE . " ! SET poster_id = " . DELETED . ", post_username = '$username' ! WHERE poster_id = $user_id"; ! if( !$db->sql_query($sql) ) ! { ! message_die(GENERAL_ERROR, 'Could not update posts for this user', '', __LINE__, __FILE__, $sql); ! } ! ! $sql = "UPDATE " . TOPICS_TABLE . " ! SET topic_poster = " . DELETED . " ! WHERE topic_poster = $user_id"; ! if( !$db->sql_query($sql) ) ! { ! message_die(GENERAL_ERROR, 'Could not update topics for this user', '', __LINE__, __FILE__, $sql); ! } ! ! $sql = "UPDATE " . VOTE_USERS_TABLE . " ! SET vote_user_id = " . DELETED . " ! WHERE vote_user_id = $user_id"; ! if( !$db->sql_query($sql) ) ! { ! message_die(GENERAL_ERROR, 'Could not update votes for this user', '', __LINE__, __FILE__, $sql); ! } ! ! $sql = "SELECT group_id ! FROM " . GROUPS_TABLE . " ! WHERE group_moderator = $user_id"; ! if( !($result = $db->sql_query($sql)) ) ! { ! message_die(GENERAL_ERROR, 'Could not select groups where user was moderator', '', __LINE__, __FILE__, $sql); ! } ! ! while ( $row_group = $db->sql_fetchrow($result) ) ! { ! $group_moderator[] = $row_group['group_id']; ! } ! ! if ( count($group_moderator) ) ! { ! $update_moderator_id = implode(', ', $group_moderator); ! ! $sql = "UPDATE " . GROUPS_TABLE . " ! SET group_moderator = " . $userdata['user_id'] . " ! WHERE group_moderator IN ($update_moderator_id)"; ! if( !$db->sql_query($sql) ) ! { ! message_die(GENERAL_ERROR, 'Could not update group moderators', '', __LINE__, __FILE__, $sql); ! } ! } ! ! $sql = "DELETE FROM " . USERS_TABLE . " ! WHERE user_id = $user_id"; ! if( !$db->sql_query($sql) ) ! { ! message_die(GENERAL_ERROR, 'Could not delete user', '', __LINE__, __FILE__, $sql); ! } ! ! $sql = "DELETE FROM " . USER_GROUP_TABLE . " ! WHERE user_id = $user_id"; ! if( !$db->sql_query($sql) ) ! { ! message_die(GENERAL_ERROR, 'Could not delete user from user_group table', '', __LINE__, __FILE__, $sql); ! } ! ! $sql = "DELETE FROM " . GROUPS_TABLE . " ! WHERE group_id = " . $row['group_id']; ! if( !$db->sql_query($sql) ) ! { ! message_die(GENERAL_ERROR, 'Could not delete group for this user', '', __LINE__, __FILE__, $sql); ! } ! ! $sql = "DELETE FROM " . AUTH_ACCESS_TABLE . " ! WHERE group_id = " . $row['group_id']; ! if( !$db->sql_query($sql) ) ! { ! message_die(GENERAL_ERROR, 'Could not delete group for this user', '', __LINE__, __FILE__, $sql); ! } ! ! $sql = "DELETE FROM " . TOPICS_WATCH_TABLE . " ! WHERE user_id = $user_id"; ! if ( !$db->sql_query($sql) ) ! { ! message_die(GENERAL_ERROR, 'Could not delete user from topic watch table', '', __LINE__, __FILE__, $sql); ! } ! ! $sql = "DELETE FROM " . BANLIST_TABLE . " ! WHERE ban_userid = $user_id"; ! if ( !$db->sql_query($sql) ) ! { ! message_die(GENERAL_ERROR, 'Could not delete user from banlist table', '', __LINE__, __FILE__, $sql); ! } ! ! $sql = "SELECT privmsgs_id ! FROM " . PRIVMSGS_TABLE . " ! WHERE privmsgs_from_userid = $user_id ! OR privmsgs_to_userid = $user_id"; ! if ( !($result = $db->sql_query($sql)) ) ! { ! message_die(GENERAL_ERROR, 'Could not select all users private messages', '', __LINE__, __FILE__, $sql); ! } ! ! // This little bit of code directly from the private messaging section. ! while ( $row_privmsgs = $db->sql_fetchrow($result) ) ! { ! $mark_list[] = $row_privmsgs['privmsgs_id']; ! } ! ! if ( count($mark_list) ) ! { ! $delete_sql_id = implode(', ', $mark_list); ! ! $delete_text_sql = "DELETE FROM " . PRIVMSGS_TEXT_TABLE . " ! WHERE privmsgs_text_id IN ($delete_sql_id)"; ! $delete_sql = "DELETE FROM " . PRIVMSGS_TABLE . " ! WHERE privmsgs_id IN ($delete_sql_id)"; ! ! if ( !$db->sql_query($delete_sql) ) ! { ! message_die(GENERAL_ERROR, 'Could not delete private message info', '', __LINE__, __FILE__, $delete_sql); ! } ! ! if ( !$db->sql_query($delete_text_sql) ) ! { ! message_die(GENERAL_ERROR, 'Could not delete private message text', '', __LINE__, __FILE__, $delete_text_sql); ! } ! } ! ! $message = $lang['User_deleted'] . '

' . sprintf($lang['Click_return_useradmin'], '', '') . '

' . sprintf($lang['Click_return_admin_index'], '', ''); ! ! message_die(GENERAL_MESSAGE, $message); ! } ! ! $username = ( !empty($HTTP_POST_VARS['username']) ) ? trim(strip_tags(htmlspecialchars($HTTP_POST_VARS['username']))) : ''; $email = ( !empty($HTTP_POST_VARS['email']) ) ? trim(strip_tags(htmlspecialchars( $HTTP_POST_VARS['email'] ) )) : ''; $password = ( !empty($HTTP_POST_VARS['password']) ) ? trim(strip_tags(htmlspecialchars( $HTTP_POST_VARS['password'] ) )) : ''; *************** *** 129,146 **** $password_confirm = ''; $icq = stripslashes($icq); ! $aim = stripslashes($aim); ! $msn = stripslashes($msn); ! $yim = stripslashes($yim); ! ! $website = stripslashes($website); ! $location = stripslashes($location); ! $occupation = stripslashes($occupation); ! $interests = stripslashes($interests); ! $signature = stripslashes($signature); $user_lang = stripslashes($user_lang); ! $user_dateformat = stripslashes($user_dateformat); if ( !isset($HTTP_POST_VARS['cancelavatar'])) { --- 277,294 ---- $password_confirm = ''; $icq = stripslashes($icq); ! $aim = htmlspecialchars(stripslashes($aim)); ! $msn = htmlspecialchars(stripslashes($msn)); ! $yim = htmlspecialchars(stripslashes($yim)); ! ! $website = htmlspecialchars(stripslashes($website)); ! $location = htmlspecialchars(stripslashes($location)); ! $occupation = htmlspecialchars(stripslashes($occupation)); ! $interests = htmlspecialchars(stripslashes($interests)); ! $signature = htmlspecialchars(stripslashes($signature)); $user_lang = stripslashes($user_lang); ! $user_dateformat = htmlspecialchars(stripslashes($user_dateformat)); if ( !isset($HTTP_POST_VARS['cancelavatar'])) { *************** *** 156,179 **** $error = FALSE; ! if( stripslashes($username) != $this_userdata['username'] ) { unset($rename_user); $result = validate_username($username); if ( $result['error'] ) { $error = TRUE; $error_msg .= ( ( isset($error_msg) ) ? '
' : '' ) . $result['error_msg']; } ! else { ! $username_sql = "username = '" . str_replace("\'", "''", $username) . "', "; $rename_user = $username; // Used for renaming usergroup } } ! $passwd_sql = ""; if( !empty($password) && !empty($password_confirm) ) { // --- 304,336 ---- $error = FALSE; ! if (stripslashes($username) != $this_userdata['username']) { unset($rename_user); + if ( stripslashes(strtolower($username)) != strtolower($this_userdata['username']) ) + { $result = validate_username($username); if ( $result['error'] ) { $error = TRUE; $error_msg .= ( ( isset($error_msg) ) ? '
' : '' ) . $result['error_msg']; } ! else if ( strtolower(str_replace("\\'", "''", $username)) == strtolower($userdata['username']) ) { ! $error = TRUE; ! $error_msg .= ( ( isset($error_msg) ) ? '
' : '' ) . $lang['Username_taken']; ! } ! } ! ! if (!$error) ! { ! $username_sql = "username = '" . str_replace("\\'", "''", $username) . "', "; $rename_user = $username; // Used for renaming usergroup } } ! $passwd_sql = ''; if( !empty($password) && !empty($password_confirm) ) { // *************** *** 201,207 **** $error_msg .= ( ( isset($error_msg) ) ? '
' : '' ) . $lang['Password_mismatch']; } ! if( $signature != "" ) { $sig_length_check = preg_replace('/(\[.*?)(=.*?)\]/is', '\\1]', stripslashes($signature)); if ( $allowhtml ) --- 358,364 ---- $error_msg .= ( ( isset($error_msg) ) ? '
' : '' ) . $lang['Password_mismatch']; } ! if ($signature != '') { $sig_length_check = preg_replace('/(\[.*?)(=.*?)\]/is', '\\1]', stripslashes($signature)); if ( $allowhtml ) *************** *** 231,237 **** { if( $this_userdata['user_avatar_type'] == USER_AVATAR_UPLOAD && $this_userdata['user_avatar'] != "" ) { ! if( @file_exists("./" . $board_config['avatar_path'] . "/" . $this_userdata['user_avatar']) ) { @unlink("./" . $board_config['avatar_path'] . "/" . $this_userdata['user_avatar']); } --- 388,394 ---- { if( $this_userdata['user_avatar_type'] == USER_AVATAR_UPLOAD && $this_userdata['user_avatar'] != "" ) { ! if( @file_exists(@phpbb_realpath("./" . $board_config['avatar_path'] . "/" . $this_userdata['user_avatar'])) ) { @unlink("./" . $board_config['avatar_path'] . "/" . $this_userdata['user_avatar']); } *************** *** 256,264 **** if( $user_avatar_loc != "" ) { ! if( file_exists($user_avatar_loc) && ereg(".jpg$|.gif$|.png$", $user_avatar_name) ) { ! if( $user_avatar_size <= $board_config['avatar_filesize'] && $avatar_size > 0) { $error_type = false; --- 413,421 ---- if( $user_avatar_loc != "" ) { ! if( file_exists(@phpbb_realpath($user_avatar_loc)) && ereg(".jpg$|.gif$|.png$", $user_avatar_name) ) { ! if( $user_avatar_size <= $board_config['avatar_filesize'] && $user_avatar_size > 0) { $error_type = false; *************** *** 299,305 **** if( $this_userdata['user_avatar_type'] == USER_AVATAR_UPLOAD && $this_userdata['user_avatar'] != "" ) { ! if( @file_exists("./../" . $board_config['avatar_path'] . "/" . $this_userdata['user_avatar']) ) { @unlink("./../" . $board_config['avatar_path'] . "/". $this_userdata['user_avatar']); } --- 456,462 ---- if( $this_userdata['user_avatar_type'] == USER_AVATAR_UPLOAD && $this_userdata['user_avatar'] != "" ) { ! if( @file_exists(@phpbb_realpath("./../" . $board_config['avatar_path'] . "/" . $this_userdata['user_avatar'])) ) { @unlink("./../" . $board_config['avatar_path'] . "/". $this_userdata['user_avatar']); } *************** *** 408,414 **** if( $this_userdata['user_avatar_type'] == USER_AVATAR_UPLOAD && $this_userdata['user_avatar'] != "") { ! if( file_exists("./../" . $board_config['avatar_path'] . "/" . $this_userdata['user_avatar']) ) { @unlink("./../" . $board_config['avatar_path'] . "/" . $this_userdata['user_avatar']); } --- 565,571 ---- if( $this_userdata['user_avatar_type'] == USER_AVATAR_UPLOAD && $this_userdata['user_avatar'] != "") { ! if( file_exists(@phpbb_realpath("./../" . $board_config['avatar_path'] . "/" . $this_userdata['user_avatar'])) ) { @unlink("./../" . $board_config['avatar_path'] . "/" . $this_userdata['user_avatar']); } *************** *** 495,693 **** // if( !$error ) { ! if( $HTTP_POST_VARS['deleteuser'] ) ! { ! $sql = "SELECT g.group_id ! FROM " . USER_GROUP_TABLE . " ug, " . GROUPS_TABLE . " g ! WHERE ug.user_id = $user_id ! AND g.group_id = ug.group_id ! AND g.group_single_user = 1"; ! if( !($result = $db->sql_query($sql)) ) ! { ! message_die(GENERAL_ERROR, 'Could not obtain group information for this user', '', __LINE__, __FILE__, $sql); ! } ! ! $row = $db->sql_fetchrow($result); ! ! $sql = "UPDATE " . POSTS_TABLE . " ! SET poster_id = " . DELETED . ", post_username = '$username' ! WHERE poster_id = $user_id"; ! if( !$db->sql_query($sql) ) ! { ! message_die(GENERAL_ERROR, 'Could not update posts for this user', '', __LINE__, __FILE__, $sql); ! } ! ! $sql = "UPDATE " . TOPICS_TABLE . " ! SET topic_poster = " . DELETED . " ! WHERE topic_poster = $user_id"; ! if( !$db->sql_query($sql) ) ! { ! message_die(GENERAL_ERROR, 'Could not update topics for this user', '', __LINE__, __FILE__, $sql); ! } ! ! $sql = "UPDATE " . VOTE_USERS_TABLE . " ! SET vote_user_id = " . DELETED . " ! WHERE vote_user_id = $user_id"; ! if( !$db->sql_query($sql) ) ! { ! message_die(GENERAL_ERROR, 'Could not update votes for this user', '', __LINE__, __FILE__, $sql); ! } ! ! $sql = "SELECT group_id ! FROM " . GROUPS_TABLE . " ! WHERE group_moderator = $user_id"; ! if( !($result = $db->sql_query($sql)) ) ! { ! message_die(GENERAL_ERROR, 'Could not select groups where user was moderator', '', __LINE__, __FILE__, $sql); ! } ! ! while ( $row_group = $db->sql_fetchrow($result) ) ! { ! $group_moderator[] = $row_group['group_id']; ! } ! ! if ( count($group_moderator) ) ! { ! $update_moderator_id = implode(', ', $group_moderator); ! ! $sql = "UPDATE " . GROUPS_TABLE . " ! SET group_moderator = " . $userdata['user_id'] . " ! WHERE group_moderator IN ($update_moderator_id)"; ! if( !$db->sql_query($sql) ) ! { ! message_die(GENERAL_ERROR, 'Could not update group moderators', '', __LINE__, __FILE__, $sql); ! } ! } ! ! $sql = "DELETE FROM " . USERS_TABLE . " ! WHERE user_id = $user_id"; ! if( !$db->sql_query($sql) ) ! { ! message_die(GENERAL_ERROR, 'Could not delete user', '', __LINE__, __FILE__, $sql); ! } ! ! $sql = "DELETE FROM " . USER_GROUP_TABLE . " WHERE user_id = $user_id"; - if( !$db->sql_query($sql) ) - { - message_die(GENERAL_ERROR, 'Could not delete user from user_group table', '', __LINE__, __FILE__, $sql); - } - - $sql = "DELETE FROM " . GROUPS_TABLE . " - WHERE group_id = " . $row['group_id']; - if( !$db->sql_query($sql) ) - { - message_die(GENERAL_ERROR, 'Could not delete group for this user', '', __LINE__, __FILE__, $sql); - } ! $sql = "DELETE FROM " . AUTH_ACCESS_TABLE . " ! WHERE group_id = " . $row['group_id']; ! if( !$db->sql_query($sql) ) ! { ! message_die(GENERAL_ERROR, 'Could not delete group for this user', '', __LINE__, __FILE__, $sql); ! } ! ! $sql = "DELETE FROM " . TOPICS_WATCH_TABLE . " ! WHERE user_id = $user_id"; ! if ( !$db->sql_query($sql) ) { ! message_die(GENERAL_ERROR, 'Could not delete user from topic watch table', '', __LINE__, __FILE__, $sql); ! } ! ! $sql = "SELECT privmsgs_id ! FROM " . PRIVMSGS_TABLE . " ! WHERE ( ( privmsgs_from_userid = $user_id ! AND privmsgs_type = " . PRIVMSGS_NEW_MAIL . " ) ! OR ( privmsgs_from_userid = $user_id ! AND privmsgs_type = " . PRIVMSGS_SENT_MAIL . " ) ! OR ( privmsgs_to_userid = $user_id ! AND privmsgs_type = " . PRIVMSGS_READ_MAIL . " ) ! OR ( privmsgs_to_userid = $user_id ! AND privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " ) ! OR ( privmsgs_from_userid = $user_id ! AND privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . " ) )"; ! if ( !($result = $db->sql_query($sql)) ) { ! message_die(GENERAL_ERROR, 'Could not select all user\'s private messages', '', __LINE__, __FILE__, $sql); ! } ! ! // ! // This little bit of code directly from the private messaging section. ! // Thanks Paul! ! // ! ! while ( $row_privmsgs = $db->sql_fetchrow($result) ) { ! $mark_list[] = $row_privmsgs['privmsgs_id']; } - - if ( count($mark_list) ) - { - $delete_sql_id = implode(', ', $mark_list); - - // - // We shouldn't need to worry about updating conters here... - // They are already gone! - // - - $delete_text_sql = "DELETE FROM " . PRIVMSGS_TEXT_TABLE . " - WHERE privmsgs_text_id IN ($delete_sql_id)"; - $delete_sql = "DELETE FROM " . PRIVMSGS_TABLE . " - WHERE privmsgs_id IN ($delete_sql_id)"; - - // - // Shouldn't need the switch statement here, either, as we just want - // to take out all of the private messages. This will not affect - // the other messages we want to keep; the ids are unique. - // - - if ( !$db->sql_query($delete_sql) ) - { - message_die(GENERAL_ERROR, 'Could not delete private message info', '', __LINE__, __FILE__, $delete_sql); } ! if ( !$db->sql_query($delete_text_sql) ) { ! message_die(GENERAL_ERROR, 'Could not delete private message text', '', __LINE__, __FILE__, $delete_text_sql); ! } ! } - $sql = "UPDATE " . PRIVMSGS_TABLE . " - SET privmsgs_to_userid = " . DELETED . " - WHERE privmsgs_to_userid = $user_id"; if ( !$db->sql_query($sql) ) { ! message_die(GENERAL_ERROR, 'Could not update private messages saved to the user', '', __LINE__, __FILE__, $sql); } - - $sql = "UPDATE " . PRIVMSGS_TABLE . " - SET privmsgs_from_userid = " . DELETED . " - WHERE privmsgs_from_userid = $user_id"; - if ( !$db->sql_query($sql) ) - { - message_die(GENERAL_ERROR, 'Could not update private messages saved from the user', '', __LINE__, __FILE__, $sql); } - $message = $lang['User_deleted']; - - } - else - { - $sql = "UPDATE " . USERS_TABLE . " - SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) . "', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", $aim) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_sig_bbcode_uid = '$signature_bbcode_uid', user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowavatar = $user_allowavatar, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_allow_pm = $user_allowpm, user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_active = $user_status, user_rank = $user_rank" . $avatar_sql . " - WHERE user_id = $user_id"; - if( $result = $db->sql_query($sql) ) - { - if( isset($rename_user) ) - { - $sql = "UPDATE " . GROUPS_TABLE . " - SET group_name = '".str_replace("\'", "''", $rename_user)."' - WHERE group_name = '".str_replace("\'", "''", $this_userdata['username'] )."'"; - if( !$result = $db->sql_query($sql) ) - { - message_die(GENERAL_ERROR, 'Could not rename users group', '', __LINE__, __FILE__, $sql); - } - } $message .= $lang['Admin_user_updated']; } else --- 652,686 ---- // if( !$error ) { ! $sql = "UPDATE " . USERS_TABLE . " ! SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) . "', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", $aim) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_sig_bbcode_uid = '$signature_bbcode_uid', user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowavatar = $user_allowavatar, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_allow_pm = $user_allowpm, user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_active = $user_status, user_rank = $user_rank" . $avatar_sql . " WHERE user_id = $user_id"; ! if( $result = $db->sql_query($sql) ) { ! if( isset($rename_user) ) { ! $sql = "UPDATE " . GROUPS_TABLE . " ! SET group_name = '".str_replace("\'", "''", $rename_user)."' ! WHERE group_name = '".str_replace("'", "''", $this_userdata['username'] )."'"; ! if( !$result = $db->sql_query($sql) ) { ! message_die(GENERAL_ERROR, 'Could not rename users group', '', __LINE__, __FILE__, $sql); } } ! // Delete user session, to prevent the user navigating the forum (if logged in) when disabled ! if (!$user_status) { ! $sql = "DELETE FROM " . SESSIONS_TABLE . " ! WHERE session_user_id = " . $user_id; if ( !$db->sql_query($sql) ) { ! message_die(GENERAL_ERROR, 'Error removing user session', '', __LINE__, __FILE__, $sql); } } $message .= $lang['Admin_user_updated']; } else *************** *** 695,701 **** $error = TRUE; $error_msg .= ( ( isset($error_msg) ) ? '
' : '' ) . $lang['Admin_user_fail']; } - } $message .= '

' . sprintf($lang['Click_return_useradmin'], '', '') . '

' . sprintf($lang['Click_return_admin_index'], '', ''); --- 688,693 ---- *************** *** 713,736 **** $template->assign_var_from_handle('ERROR_BOX', 'reg_header'); ! $username = stripslashes($username); $email = stripslashes($email); $password = ''; $password_confirm = ''; $icq = stripslashes($icq); ! $aim = str_replace('+', ' ', stripslashes($aim)); ! $msn = stripslashes($msn); ! $yim = stripslashes($yim); ! ! $website = stripslashes($website); ! $location = stripslashes($location); ! $occupation = stripslashes($occupation); ! $interests = stripslashes($interests); ! $signature = stripslashes($signature); $user_lang = stripslashes($user_lang); ! $user_dateformat = stripslashes($user_dateformat); } } else if( !isset( $HTTP_POST_VARS['submit'] ) && $mode != 'save' && !isset( $HTTP_POST_VARS['avatargallery'] ) && !isset( $HTTP_POST_VARS['submitavatar'] ) && !isset( $HTTP_POST_VARS['cancelavatar'] ) ) --- 705,728 ---- $template->assign_var_from_handle('ERROR_BOX', 'reg_header'); ! $username = htmlspecialchars(stripslashes($username)); $email = stripslashes($email); $password = ''; $password_confirm = ''; $icq = stripslashes($icq); ! $aim = htmlspecialchars(str_replace('+', ' ', stripslashes($aim))); ! $msn = htmlspecialchars(stripslashes($msn)); ! $yim = htmlspecialchars(stripslashes($yim)); ! ! $website = htmlspecialchars(stripslashes($website)); ! $location = htmlspecialchars(stripslashes($location)); ! $occupation = htmlspecialchars(stripslashes($occupation)); ! $interests = htmlspecialchars(stripslashes($interests)); ! $signature = htmlspecialchars(stripslashes($signature)); $user_lang = stripslashes($user_lang); ! $user_dateformat = htmlspecialchars(stripslashes($user_dateformat)); } } else if( !isset( $HTTP_POST_VARS['submit'] ) && $mode != 'save' && !isset( $HTTP_POST_VARS['avatargallery'] ) && !isset( $HTTP_POST_VARS['submitavatar'] ) && !isset( $HTTP_POST_VARS['cancelavatar'] ) ) *************** *** 746,752 **** } else { ! $this_userdata = get_userdata( $HTTP_POST_VARS['username'] ); if( !$this_userdata ) { message_die(GENERAL_MESSAGE, $lang['No_user_id_specified'] ); --- 738,744 ---- } else { ! $this_userdata = get_userdata($HTTP_POST_VARS['username'], true); if( !$this_userdata ) { message_die(GENERAL_MESSAGE, $lang['No_user_id_specified'] ); *************** *** 763,777 **** $password_confirm = ''; $icq = $this_userdata['user_icq']; ! $aim = str_replace('+', ' ', $this_userdata['user_aim'] ); ! $msn = $this_userdata['user_msnm']; ! $yim = $this_userdata['user_yim']; ! ! $website = $this_userdata['user_website']; ! $location = $this_userdata['user_from']; ! $occupation = $this_userdata['user_occ']; ! $interests = $this_userdata['user_interests']; ! $signature = $this_userdata['user_sig']; $viewemail = $this_userdata['user_viewemail']; $notifypm = $this_userdata['user_notify_pm']; --- 755,771 ---- $password_confirm = ''; $icq = $this_userdata['user_icq']; ! $aim = htmlspecialchars(str_replace('+', ' ', $this_userdata['user_aim'] )); ! $msn = htmlspecialchars($this_userdata['user_msnm']); ! $yim = htmlspecialchars($this_userdata['user_yim']); ! ! $website = htmlspecialchars($this_userdata['user_website']); ! $location = htmlspecialchars($this_userdata['user_from']); ! $occupation = htmlspecialchars($this_userdata['user_occ']); ! $interests = htmlspecialchars($this_userdata['user_interests']); ! ! $signature = ($this_userdata['user_sig_bbcode_uid'] != '') ? preg_replace('#:' . $this_userdata['user_sig_bbcode_uid'] . '#si', '', $this_userdata['user_sig']) : $this_userdata['user_sig']; ! $signature = preg_replace($html_entities_match, $html_entities_replace, $signature); $viewemail = $this_userdata['user_viewemail']; $notifypm = $this_userdata['user_notify_pm']; *************** *** 788,794 **** $user_style = $this_userdata['user_style']; $user_lang = $this_userdata['user_lang']; $user_timezone = $this_userdata['user_timezone']; ! $user_dateformat = $this_userdata['user_dateformat']; $user_status = $this_userdata['user_active']; $user_allowavatar = $this_userdata['user_allowavatar']; --- 782,788 ---- $user_style = $this_userdata['user_style']; $user_lang = $this_userdata['user_lang']; $user_timezone = $this_userdata['user_timezone']; ! $user_dateformat = htmlspecialchars($this_userdata['user_dateformat']); $user_status = $this_userdata['user_active']; $user_allowavatar = $this_userdata['user_allowavatar']; *************** *** 816,822 **** $avatar_images = array(); while( $file = @readdir($dir) ) { ! if( $file != "." && $file != ".." && !is_file("./../" . $board_config['avatar_gallery_path'] . "/" . $file) && !is_link("./../" . $board_config['avatar_gallery_path'] . "/" . $file) ) { $sub_dir = @opendir("../" . $board_config['avatar_gallery_path'] . "/" . $file); --- 810,816 ---- $avatar_images = array(); while( $file = @readdir($dir) ) { ! if( $file != "." && $file != ".." && !is_file(phpbb_realpath("./../" . $board_config['avatar_gallery_path'] . "/" . $file)) && !is_link(phpbb_realpath("./../" . $board_config['avatar_gallery_path'] . "/" . $file)) ) { $sub_dir = @opendir("../" . $board_config['avatar_gallery_path'] . "/" . $file); *************** *** 980,987 **** $rank_select_box .= ''; } - $signature = preg_replace('/\:[0-9a-z\:]*?\]/si', ']', $signature); - $template->set_filenames(array( "body" => "admin/user_edit_body.tpl") ); --- 974,979 ---- *************** *** 1024,1030 **** 'ALWAYS_ALLOW_SMILIES_YES' => ($allowsmilies) ? 'checked="checked"' : '', 'ALWAYS_ALLOW_SMILIES_NO' => (!$allowsmilies) ? 'checked="checked"' : '', 'AVATAR' => $avatar, ! 'LANGUAGE_SELECT' => language_select($user_lang, 'language', '../language'), 'TIMEZONE_SELECT' => tz_select($user_timezone), 'STYLE_SELECT' => style_select($user_style, 'style'), 'DATE_FORMAT' => $user_dateformat, --- 1016,1022 ---- 'ALWAYS_ALLOW_SMILIES_YES' => ($allowsmilies) ? 'checked="checked"' : '', 'ALWAYS_ALLOW_SMILIES_NO' => (!$allowsmilies) ? 'checked="checked"' : '', 'AVATAR' => $avatar, ! 'LANGUAGE_SELECT' => language_select($user_lang), 'TIMEZONE_SELECT' => tz_select($user_timezone), 'STYLE_SELECT' => style_select($user_style, 'style'), 'DATE_FORMAT' => $user_dateformat, *************** *** 1108,1114 **** 'S_PROFILE_ACTION' => append_sid("admin_users.$phpEx")) ); ! if( file_exists('./../' . $board_config['avatar_path'] ) && ($board_config['allow_avatar_upload'] == TRUE) ) { if ( $form_enctype != '' ) { --- 1100,1106 ---- 'S_PROFILE_ACTION' => append_sid("admin_users.$phpEx")) ); ! if( file_exists(@phpbb_realpath('./../' . $board_config['avatar_path'])) && ($board_config['allow_avatar_upload'] == TRUE) ) { if ( $form_enctype != '' ) { *************** *** 1117,1123 **** $template->assign_block_vars('avatar_remote_upload', array() ); } ! if( file_exists('./../' . $board_config['avatar_gallery_path'] ) && ($board_config['allow_avatar_local'] == TRUE) ) { $template->assign_block_vars('avatar_local_gallery', array() ); } --- 1109,1115 ---- $template->assign_block_vars('avatar_remote_upload', array() ); } ! if( file_exists(@phpbb_realpath('./../' . $board_config['avatar_gallery_path'])) && ($board_config['allow_avatar_local'] == TRUE) ) { $template->assign_block_vars('avatar_local_gallery', array() ); } diff -crbB phpbb203/admin/index.php phpbb206/admin/index.php *** phpbb203/admin/index.php Sun Jun 15 14:32:15 2003 --- phpbb206/admin/index.php Sun Aug 3 13:59:56 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: index.php,v 1.40.2.2 2002/05/17 22:58:18 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: index.php,v 1.40.2.5 2003/08/03 11:50:51 acydburn Exp $ * * ***************************************************************************/ *************** *** 132,137 **** --- 132,138 ---- "L_ADMIN_INTRO" => $lang['Admin_intro'], "L_FORUM_STATS" => $lang['Forum_stats'], "L_WHO_IS_ONLINE" => $lang['Who_is_Online'], + "L_USERNAME" => $lang['Username'], "L_LOCATION" => $lang['Location'], "L_LAST_UPDATE" => $lang['Last_updated'], "L_IP_ADDRESS" => $lang['IP_Address'], *************** *** 454,460 **** "FORUM_LOCATION" => $location, "IP_ADDRESS" => $reg_ip, ! "U_WHOIS_IP" => "http://www.samspade.org/t/ipwhois?a=$reg_ip", "U_USER_PROFILE" => append_sid("admin_users.$phpEx?mode=edit&" . POST_USERS_URL . "=" . $onlinerow_reg[$i]['user_id']), "U_FORUM_LOCATION" => append_sid($location_url)) ); --- 455,461 ---- "FORUM_LOCATION" => $location, "IP_ADDRESS" => $reg_ip, ! "U_WHOIS_IP" => "http://network-tools.com/default.asp?host=$reg_ip", "U_USER_PROFILE" => append_sid("admin_users.$phpEx?mode=edit&" . POST_USERS_URL . "=" . $onlinerow_reg[$i]['user_id']), "U_FORUM_LOCATION" => append_sid($location_url)) ); *************** *** 546,552 **** "FORUM_LOCATION" => $location, "IP_ADDRESS" => $guest_ip, ! "U_WHOIS_IP" => "http://www.samspade.org/t/ipwhois?a=$guest_ip", "U_FORUM_LOCATION" => append_sid($location_url)) ); } --- 547,553 ---- "FORUM_LOCATION" => $location, "IP_ADDRESS" => $guest_ip, ! "U_WHOIS_IP" => "http://network-tools.com/default.asp?host=$guest_ip", "U_FORUM_LOCATION" => append_sid($location_url)) ); } diff -crbB phpbb203/admin/page_header_admin.php phpbb206/admin/page_header_admin.php *** phpbb203/admin/page_header_admin.php Sun Jun 15 14:32:15 2003 --- phpbb206/admin/page_header_admin.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: page_header_admin.php,v 1.12.2.2 2002/05/12 15:57:45 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: page_header_admin.php,v 1.12.2.5 2003/06/10 20:48:18 acydburn Exp $ * * ***************************************************************************/ *************** *** 35,41 **** { $phpver = phpversion(); ! if ( $phpver >= '4.0.4pl1' && strstr($HTTP_USER_AGENT,'compatible') ) { if ( extension_loaded('zlib') ) { --- 35,43 ---- { $phpver = phpversion(); ! $useragent = (isset($_SERVER["HTTP_USER_AGENT"]) ) ? $_SERVER["HTTP_USER_AGENT"] : $HTTP_USER_AGENT; ! ! if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) ) { if ( extension_loaded('zlib') ) { *************** *** 62,67 **** --- 64,73 ---- 'header' => 'admin/page_header.tpl') ); + // Format Timezone. We are unable to use array_pop here, because of PHP3 compatibility + $l_timezone = explode('.', $board_config['board_timezone']); + $l_timezone = (count($l_timezone) > 1 && $l_timezone[count($l_timezone)-1] != 0) ? $lang[sprintf('%.1f', $board_config['board_timezone'])] : $lang[number_format($board_config['board_timezone'])]; + // // The following assigns all _common_ variables that may be used at any point // in a template. Note that all URL's should be wrapped in append_sid, as *************** *** 77,83 **** 'U_INDEX' => append_sid('../index.'.$phpEx), ! 'S_TIMEZONE' => sprintf($lang['All_times'], $lang[$board_config['board_timezone']]), 'S_LOGIN_ACTION' => append_sid('../login.'.$phpEx), 'S_JUMPBOX_ACTION' => append_sid('../viewforum.'.$phpEx), 'S_CURRENT_TIME' => sprintf($lang['Current_time'], create_date($board_config['default_dateformat'], time(), $board_config['board_timezone'])), --- 83,89 ---- 'U_INDEX' => append_sid('../index.'.$phpEx), ! 'S_TIMEZONE' => sprintf($lang['All_times'], $l_timezone), 'S_LOGIN_ACTION' => append_sid('../login.'.$phpEx), 'S_JUMPBOX_ACTION' => append_sid('../viewforum.'.$phpEx), 'S_CURRENT_TIME' => sprintf($lang['Current_time'], create_date($board_config['default_dateformat'], time(), $board_config['board_timezone'])), diff -crbB phpbb203/admin/pagestart.php phpbb206/admin/pagestart.php *** phpbb203/admin/pagestart.php Sun Jun 15 14:32:15 2003 --- phpbb206/admin/pagestart.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: pagestart.php,v 1.1.2.2 2002/05/13 13:18:17 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: pagestart.php,v 1.1.2.6 2003/05/06 20:18:42 acydburn Exp $ * * ***************************************************************************/ *************** *** 20,32 **** * ***************************************************************************/ ! if ( !defined('IN_PHPBB') ) { die("Hacking attempt"); } define('IN_ADMIN', true); ! include($phpbb_root_path . 'common.'.$phpEx); // --- 20,32 ---- * ***************************************************************************/ ! if (!defined('IN_PHPBB')) { die("Hacking attempt"); } define('IN_ADMIN', true); ! // Include files include($phpbb_root_path . 'common.'.$phpEx); // *************** *** 37,54 **** // // End session management // ! if( !$userdata['session_logged_in'] ) { ! $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 ) { message_die(GENERAL_MESSAGE, $lang['Not_admin']); } ! if ( empty($no_page_header) ) { // Not including the pageheader can be neccesarry if META tags are // needed in the calling script. --- 37,65 ---- // // End session management // ! ! if (!$userdata['session_logged_in']) { ! redirect(append_sid("login.$phpEx?redirect=admin/", true)); } ! else if ($userdata['user_level'] != ADMIN) { message_die(GENERAL_MESSAGE, $lang['Not_admin']); } ! if ($HTTP_GET_VARS['sid'] != $userdata['session_id']) ! { ! $url = str_replace(preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['server_name'])), '', $HTTP_SERVER_VARS['REQUEST_URI']); ! $url = str_replace(preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['script_path'])), '', $url); ! $url = str_replace('//', '/', $url); ! $url = preg_replace('/sid=([^&]*)(&?)/i', '', $url); ! $url = preg_replace('/\?$/', '', $url); ! $url .= ((strpos($url, '?')) ? '&' : '?') . 'sid=' . $userdata['session_id']; ! ! redirect($url); ! } ! ! if (empty($no_page_header)) { // Not including the pageheader can be neccesarry if META tags are // needed in the calling script. diff -crbB phpbb203/common.php phpbb206/common.php *** phpbb203/common.php Sun Jun 15 14:32:16 2003 --- phpbb206/common.php Sun Jul 20 16:37:23 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: common.php,v 1.74.2.3 2002/05/13 13:18:17 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: common.php,v 1.74.2.10 2003/06/04 17:41:39 acydburn Exp $ * * ***************************************************************************/ *************** *** 112,118 **** if( !defined("PHPBB_INSTALLED") ) { ! header("Location: install.$phpEx"); exit; } --- 112,118 ---- if( !defined("PHPBB_INSTALLED") ) { ! header("Location: install/install.$phpEx"); exit; } *************** *** 124,161 **** include($phpbb_root_path . 'includes/db.'.$phpEx); // - // Mozilla navigation bar - // Default items that should be valid on all pages. - // Defined here and not in page_header.php so they can be redefined in the code - // - $nav_links['top'] = array ( - 'url' => append_sid($phpbb_root_dir."index.".$phpEx), - 'title' => sprintf($lang['Forum_Index'], $board_config['sitename']) - ); - $nav_links['search'] = array ( - 'url' => append_sid($phpbb_root_dir."search.".$phpEx), - 'title' => $lang['Search'] - ); - $nav_links['help'] = array ( - 'url' => append_sid($phpbb_root_dir."faq.".$phpEx), - 'title' => $lang['FAQ'] - ); - $nav_links['author'] = array ( - 'url' => append_sid($phpbb_root_dir."memberlist.".$phpEx), - 'title' => $lang['Memberlist'] - ); - - // // Obtain and encode users IP // if( getenv('HTTP_X_FORWARDED_FOR') != '' ) { $client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : $REMOTE_ADDR ); ! if ( preg_match("/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/", getenv('HTTP_X_FORWARDED_FOR'), $ip_list) ) { ! $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]); } } else --- 124,151 ---- include($phpbb_root_path . 'includes/db.'.$phpEx); // // Obtain and encode users IP // if( getenv('HTTP_X_FORWARDED_FOR') != '' ) { $client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : $REMOTE_ADDR ); ! $entries = explode(',', getenv('HTTP_X_FORWARDED_FOR')); ! reset($entries); ! while (list(, $entry) = each($entries)) ! { ! $entry = trim($entry); ! if ( preg_match("/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/", $entry, $ip_list) ) ! { ! $private_ip = array('/^0\./', '/^127\.0\.0\.1/', '/^192\.168\..*/', '/^172\.((1[6-9])|(2[0-9])|(3[0-1]))\..*/', '/^10\..*/', '/^224\..*/', '/^240\..*/'); ! $found_ip = preg_replace($private_ip, $client_ip, $ip_list[1]); ! ! if ($client_ip != $found_ip) { ! $client_ip = $found_ip; ! break; ! } ! } } } else *************** *** 181,186 **** --- 171,181 ---- $board_config[$row['config_name']] = $row['config_value']; } + if (file_exists('install') || file_exists('contrib')) + { + message_die(GENERAL_MESSAGE, 'Please ensure both the install/ and contrib/ directories are deleted'); + } + // // Show 'Board is disabled' message if needed. // Only in phpbb203: config.php diff -crbB phpbb203/db/mssql.php phpbb206/db/mssql.php *** phpbb203/db/mssql.php Sun Jun 15 14:32:15 2003 --- phpbb206/db/mssql.php Sun Jul 20 16:37:21 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : supportphpbb.com * ! * $Id: mssql.php,v 1.22.2.1 2002/05/12 01:27:26 psotfx Exp $ * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : supportphpbb.com * ! * $Id: mssql.php,v 1.22.2.2 2002/12/21 18:31:53 psotfx Exp $ * ***************************************************************************/ *************** *** 51,57 **** $this->server = $sqlserver; $this->dbname = $database; ! $this->db_connect_id = ( $this->persistency ) ? mssql_pconnect($this->server, $this->user, $this->password) : mssql_connect($this->server, $this->user, $this->password); if( $this->db_connect_id && $this->dbname != "" ) { --- 51,57 ---- $this->server = $sqlserver; $this->dbname = $database; ! $this->db_connect_id = ( $this->persistency ) ? @mssql_pconnect($this->server, $this->user, $this->password) : @mssql_connect($this->server, $this->user, $this->password); if( $this->db_connect_id && $this->dbname != "" ) { *************** *** 92,98 **** // // Query method // ! function sql_query($query = "", $transaction = FALSE) { // // Remove any pre-existing queries --- 92,98 ---- // // Query method // ! function sql_query($query = '', $transaction = FALSE) { // // Remove any pre-existing queries *************** *** 100,112 **** unset($this->result); unset($this->row); ! if ( $query != "" ) { $this->num_queries++; if ( $transaction == BEGIN_TRANSACTION && !$this->in_transaction ) { ! if ( !mssql_query("BEGIN TRANSACTION", $this->db_connect_id) ) { return false; } --- 100,112 ---- unset($this->result); unset($this->row); ! if ( $query != '' ) { $this->num_queries++; if ( $transaction == BEGIN_TRANSACTION && !$this->in_transaction ) { ! if ( !@mssql_query('BEGIN TRANSACTION', $this->db_connect_id) ) { return false; } *************** *** 125,131 **** // returns something then there's a problem. This may well be a false assumption though // ... needs checking under Windows itself. // ! if( preg_match("/^SELECT(.*?)(LIMIT ([0-9]+)[, ]*([0-9]+)*)?$/s", $query, $limits) ) { $query = $limits[1]; --- 125,131 ---- // returns something then there's a problem. This may well be a false assumption though // ... needs checking under Windows itself. // ! if( preg_match('#^SELECT(.*?)(LIMIT ([0-9]+)[, ]*([0-9]+)*)?$#s', $query, $limits) ) { $query = $limits[1]; *************** *** 134,143 **** $row_offset = ( $limits[4] ) ? $limits[3] : ""; $num_rows = ( $limits[4] ) ? $limits[4] : $limits[3]; ! $query = "TOP " . ( $row_offset + $num_rows ) . $query; } ! $this->result = mssql_query("SELECT $query", $this->db_connect_id); if( $this->result ) { --- 134,143 ---- $row_offset = ( $limits[4] ) ? $limits[3] : ""; $num_rows = ( $limits[4] ) ? $limits[4] : $limits[3]; ! $query = 'TOP ' . ( $row_offset + $num_rows ) . $query; } ! $this->result = @mssql_query("SELECT $query", $this->db_connect_id); if( $this->result ) { *************** *** 145,164 **** if( $row_offset > 0 ) { ! mssql_data_seek($this->result, $row_offset); } } } ! else if( eregi("^INSERT ", $query) ) { ! if( mssql_query($query, $this->db_connect_id) ) { $this->result = time() + microtime(); ! $result_id = mssql_query("SELECT @@IDENTITY AS id, @@ROWCOUNT as affected", $this->db_connect_id); if( $result_id ) { ! if( $row = mssql_fetch_array($result_id) ) { $this->next_id[$this->db_connect_id] = $row['id']; $this->affected_rows[$this->db_connect_id] = $row['affected']; --- 145,164 ---- if( $row_offset > 0 ) { ! @mssql_data_seek($this->result, $row_offset); } } } ! else if( preg_match('#^INSERT #i', $query) ) { ! if( @mssql_query($query, $this->db_connect_id) ) { $this->result = time() + microtime(); ! $result_id = @mssql_query('SELECT @@IDENTITY AS id, @@ROWCOUNT as affected', $this->db_connect_id); if( $result_id ) { ! if( $row = @mssql_fetch_array($result_id) ) { $this->next_id[$this->db_connect_id] = $row['id']; $this->affected_rows[$this->db_connect_id] = $row['affected']; *************** *** 168,181 **** } else { ! if( mssql_query($query, $this->db_connect_id) ) { $this->result = time() + microtime(); ! $result_id = mssql_query("SELECT @@ROWCOUNT as affected", $this->db_connect_id); if( $result_id ) { ! if( $row = mssql_fetch_array($result_id) ) { $this->affected_rows[$this->db_connect_id] = $row['affected']; } --- 168,181 ---- } else { ! if( @mssql_query($query, $this->db_connect_id) ) { $this->result = time() + microtime(); ! $result_id = @mssql_query('SELECT @@ROWCOUNT as affected', $this->db_connect_id); if( $result_id ) { ! if( $row = @mssql_fetch_array($result_id) ) { $this->affected_rows[$this->db_connect_id] = $row['affected']; } *************** *** 187,193 **** { if( $this->in_transaction ) { ! mssql_query("ROLLBACK", $this->db_connect_id); $this->in_transaction = FALSE; } --- 187,193 ---- { if( $this->in_transaction ) { ! @mssql_query('ROLLBACK', $this->db_connect_id); $this->in_transaction = FALSE; } *************** *** 198,204 **** { $this->in_transaction = FALSE; ! if( !@mssql_query("COMMIT", $this->db_connect_id) ) { @mssql_query("ROLLBACK", $this->db_connect_id); return false; --- 198,204 ---- { $this->in_transaction = FALSE; ! if( !@mssql_query('COMMIT', $this->db_connect_id) ) { @mssql_query("ROLLBACK", $this->db_connect_id); return false; *************** *** 213,221 **** { $this->in_transaction = FALSE; ! if( !@mssql_query("COMMIT", $this->db_connect_id) ) { ! @mssql_query("ROLLBACK", $this->db_connect_id); return false; } } --- 213,221 ---- { $this->in_transaction = FALSE; ! if( !@mssql_query('COMMIT', $this->db_connect_id) ) { ! @mssql_query('ROLLBACK', $this->db_connect_id); return false; } } *************** *** 236,242 **** if( $query_id ) { ! return ( !empty($this->limit_offset[$query_id]) ) ? mssql_num_rows($query_id) - $this->limit_offset[$query_id] : @mssql_num_rows($query_id); } else { --- 236,242 ---- if( $query_id ) { ! return ( !empty($this->limit_offset[$query_id]) ) ? @mssql_num_rows($query_id) - $this->limit_offset[$query_id] : @mssql_num_rows($query_id); } else { *************** *** 251,257 **** $query_id = $this->result; } ! return ( $query_id ) ? mssql_num_fields($query_id) : false; } function sql_fieldname($offset, $query_id = 0) --- 251,257 ---- $query_id = $this->result; } ! return ( $query_id ) ? @mssql_num_fields($query_id) : false; } function sql_fieldname($offset, $query_id = 0) *************** *** 261,267 **** $query_id = $this->result; } ! return ( $query_id ) ? mssql_field_name($query_id, $offset) : false; } function sql_fieldtype($offset, $query_id = 0) --- 261,267 ---- $query_id = $this->result; } ! return ( $query_id ) ? @mssql_field_name($query_id, $offset) : false; } function sql_fieldtype($offset, $query_id = 0) *************** *** 271,277 **** $query_id = $this->result; } ! return ( $query_id ) ? mssql_field_type($query_id, $offset) : false; } function sql_fetchrow($query_id = 0) --- 271,277 ---- $query_id = $this->result; } ! return ( $query_id ) ? @mssql_field_type($query_id, $offset) : false; } function sql_fetchrow($query_id = 0) *************** *** 285,291 **** { empty($row); ! $row = mssql_fetch_array($query_id); while( list($key, $value) = @each($row) ) { --- 285,291 ---- { empty($row); ! $row = @mssql_fetch_array($query_id); while( list($key, $value) = @each($row) ) { *************** *** 313,319 **** $i = 0; empty($rowset); ! while( $row = mssql_fetch_array($query_id)) { while( list($key, $value) = @each($row) ) { --- 313,319 ---- $i = 0; empty($rowset); ! while( $row = @mssql_fetch_array($query_id)) { while( list($key, $value) = @each($row) ) { *************** *** 344,361 **** { if( $this->limit_offset[$query_id] > 0 ) { ! $result = ( !empty($this->limit_offset[$query_id]) ) ? mssql_result($this->result, ($this->limit_offset[$query_id] + $row), $field) : false; } else { ! $result = mssql_result($this->result, $row, $field); } } else { if( empty($this->row[$query_id]) ) { ! $this->row[$query_id] = mssql_fetch_array($query_id); $result = stripslashes($this->row[$query_id][$field]); } } --- 344,361 ---- { if( $this->limit_offset[$query_id] > 0 ) { ! $result = ( !empty($this->limit_offset[$query_id]) ) ? @mssql_result($this->result, ($this->limit_offset[$query_id] + $row), $field) : false; } else { ! $result = @mssql_result($this->result, $row, $field); } } else { if( empty($this->row[$query_id]) ) { ! $this->row[$query_id] = @mssql_fetch_array($query_id); $result = stripslashes($this->row[$query_id][$field]); } } *************** *** 377,383 **** if( $query_id ) { ! return ( !empty($this->limit_offset[$query_id]) ) ? mssql_data_seek($query_id, ($this->limit_offset[$query_id] + $rownum)) : mssql_data_seek($query_id, $rownum); } else { --- 377,383 ---- if( $query_id ) { ! return ( !empty($this->limit_offset[$query_id]) ) ? @mssql_data_seek($query_id, ($this->limit_offset[$query_id] + $rownum)) : @mssql_data_seek($query_id, $rownum); } else { *************** *** 402,408 **** $query_id = $this->result; } ! return ( $query_id ) ? mssql_free_result($query_id) : false; } function sql_error($query_id = 0) --- 402,408 ---- $query_id = $this->result; } ! return ( $query_id ) ? @mssql_free_result($query_id) : false; } function sql_error($query_id = 0) diff -crbB phpbb203/db/oracle.php phpbb206/db/oracle.php *** phpbb203/db/oracle.php Sun Jun 15 14:32:15 2003 --- phpbb206/db/oracle.php Sun Jul 20 16:37:21 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: oracle.php,v 1.18 2002/01/28 17:24:45 psotfx Exp $ * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: oracle.php,v 1.18.2.1 2002/11/26 11:42:12 psotfx Exp $ * ***************************************************************************/ *************** *** 296,302 **** { $rows = @OCIFetchStatement($query_id, $results); @OCIExecute($query_id, OCI_DEFAULT); ! for($i = 0; $i <= $rows; $i++) { @OCIFetchInto($query_id, $tmp_result, OCI_ASSOC+OCI_RETURN_NULLS); --- 296,302 ---- { $rows = @OCIFetchStatement($query_id, $results); @OCIExecute($query_id, OCI_DEFAULT); ! for($i = 0; $i < $rows; $i++) { @OCIFetchInto($query_id, $tmp_result, OCI_ASSOC+OCI_RETURN_NULLS); diff -crbB phpbb203/groupcp.php phpbb206/groupcp.php *** phpbb203/groupcp.php Sun Jun 15 14:32:15 2003 --- phpbb206/groupcp.php Sun Jul 20 16:37:21 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: groupcp.php,v 1.58.2.5 2002/05/20 00:21:09 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: groupcp.php,v 1.58.2.18 2003/06/10 17:18:13 acydburn Exp $ * * ***************************************************************************/ *************** *** 127,133 **** if ( isset($HTTP_GET_VARS[POST_GROUPS_URL]) || isset($HTTP_POST_VARS[POST_GROUPS_URL]) ) { ! $group_id = ( isset($HTTP_GET_VARS[POST_GROUPS_URL]) ) ? intval($HTTP_GET_VARS[POST_GROUPS_URL]) : intval($HTTP_POST_VARS[POST_GROUPS_URL]); } else { --- 127,133 ---- if ( isset($HTTP_GET_VARS[POST_GROUPS_URL]) || isset($HTTP_POST_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 { *************** *** 151,165 **** // // Default var values // - $header_location = ( @preg_match('/Microsoft|WebSTAR/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: '; $is_moderator = FALSE; if ( isset($HTTP_POST_VARS['groupstatus']) && $group_id ) { if ( !$userdata['session_logged_in'] ) { ! header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true)); ! exit; } $sql = "SELECT group_moderator --- 151,163 ---- // // Default var values // $is_moderator = FALSE; if ( isset($HTTP_POST_VARS['groupstatus']) && $group_id ) { if ( !$userdata['session_logged_in'] ) { ! redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true)); } $sql = "SELECT group_moderator *************** *** 208,215 **** // if ( !$userdata['session_logged_in'] ) { ! 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 --- 206,212 ---- // if ( !$userdata['session_logged_in'] ) { ! redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true)); } $sql = "SELECT ug.user_id, g.group_type *************** *** 277,293 **** 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('group_request', $moderator['user_lang']); $emailer->email_address($moderator['user_email']); ! $emailer->set_subject();//$lang['Group_request'] ! $emailer->extra_headers($email_headers); $emailer->assign_vars(array( 'SITENAME' => $board_config['sitename'], 'GROUP_MODERATOR' => $moderator['username'], ! 'EMAIL_SIG' => str_replace('
', "\n", "-- \n" . $board_config['board_email_sig']), 'U_GROUPCP' => $server_url . '?' . POST_GROUPS_URL . "=$group_id&validate=true") ); --- 274,290 ---- include($phpbb_root_path . 'includes/emailer.'.$phpEx); $emailer = new emailer($board_config['smtp_delivery']); ! $emailer->from($board_config['board_email']); ! $emailer->replyto($board_config['board_email']); $emailer->use_template('group_request', $moderator['user_lang']); $emailer->email_address($moderator['user_email']); ! $emailer->set_subject($lang['Group_request']); $emailer->assign_vars(array( 'SITENAME' => $board_config['sitename'], 'GROUP_MODERATOR' => $moderator['username'], ! 'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('
', "\n", "-- \n" . $board_config['board_email_sig']) : '', 'U_GROUPCP' => $server_url . '?' . POST_GROUPS_URL . "=$group_id&validate=true") ); *************** *** 310,322 **** // if ( $cancel ) { ! header($header_location . append_sid("groupcp.$phpEx", true)); ! exit; } elseif ( !$userdata['session_logged_in'] ) { ! header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true)); ! exit; } if ( $confirm ) --- 307,317 ---- // if ( $cancel ) { ! redirect(append_sid("groupcp.$phpEx", true)); } elseif ( !$userdata['session_logged_in'] ) { ! redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true)); } if ( $confirm ) *************** *** 357,363 **** 'META' => '') ); ! $message = $lang['Usub_success'] . '

' . sprintf($lang['Click_return_group'], '', '') . '

' . sprintf($lang['Click_return_index'], '', ''); message_die(GENERAL_MESSAGE, $message); } --- 352,358 ---- 'META' => '') ); ! $message = $lang['Unsub_success'] . '

' . sprintf($lang['Click_return_group'], '', '') . '

' . sprintf($lang['Click_return_index'], '', ''); message_die(GENERAL_MESSAGE, $message); } *************** *** 399,406 **** { if ( !$userdata['session_logged_in'] ) { ! header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true)); ! exit; } } --- 394,400 ---- { if ( !$userdata['session_logged_in'] ) { ! redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true)); } } *************** *** 461,468 **** { if ( !$userdata['session_logged_in'] ) { ! header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true)); ! exit; } if ( !$is_moderator ) --- 455,461 ---- { if ( !$userdata['session_logged_in'] ) { ! redirect(append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true)); } if ( !$is_moderator ) *************** *** 478,484 **** if ( isset($HTTP_POST_VARS['add']) ) { ! $username = ( isset($HTTP_POST_VARS['username']) ) ? $HTTP_POST_VARS['username'] : ""; $sql = "SELECT user_id, user_email, user_lang, user_level FROM " . USERS_TABLE . " --- 471,477 ---- if ( isset($HTTP_POST_VARS['add']) ) { ! $username = ( isset($HTTP_POST_VARS['username']) ) ? htmlspecialchars($HTTP_POST_VARS['username']) : ''; $sql = "SELECT user_id, user_email, user_lang, user_level FROM " . USERS_TABLE . " *************** *** 559,575 **** 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('group_added', $row['user_lang']); $emailer->email_address($row['user_email']); ! $emailer->set_subject();//$lang['Group_added'] ! $emailer->extra_headers($email_headers); $emailer->assign_vars(array( 'SITENAME' => $board_config['sitename'], 'GROUP_NAME' => $group_name, ! 'EMAIL_SIG' => str_replace('
', "\n", "-- \n" . $board_config['board_email_sig']), 'U_GROUPCP' => $server_url . '?' . POST_GROUPS_URL . "=$group_id") ); --- 552,568 ---- include($phpbb_root_path . 'includes/emailer.'.$phpEx); $emailer = new emailer($board_config['smtp_delivery']); ! $emailer->from($board_config['board_email']); ! $emailer->replyto($board_config['board_email']); $emailer->use_template('group_added', $row['user_lang']); $emailer->email_address($row['user_email']); ! $emailer->set_subject($lang['Group_added']); $emailer->assign_vars(array( 'SITENAME' => $board_config['sitename'], 'GROUP_NAME' => $group_name, ! 'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('
', "\n", "-- \n" . $board_config['board_email_sig']) : '', 'U_GROUPCP' => $server_url . '?' . POST_GROUPS_URL . "=$group_id") ); *************** *** 691,700 **** message_die(GENERAL_ERROR, 'Could not get user email information', '', __LINE__, __FILE__, $sql); } ! $email_addresses = ''; ! while( $row = $db->sql_fetchrow($result) ) { ! $email_addresses .= ( ( $email_addresses != '' ) ? ', ' : '' ) . $row['user_email']; } // --- 684,693 ---- message_die(GENERAL_ERROR, 'Could not get user email information', '', __LINE__, __FILE__, $sql); } ! $bcc_list = array(); ! while ($row = $db->sql_fetchrow($result)) { ! $bcc_list[] = $row['user_email']; } // *************** *** 714,730 **** 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'] . "\nBcc: " . $email_addresses . "\n"; $emailer->use_template('group_approved'); ! $emailer->email_address($userdata['user_email']); ! $emailer->set_subject();//$lang['Group_approved'] ! $emailer->extra_headers($email_headers); $emailer->assign_vars(array( 'SITENAME' => $board_config['sitename'], 'GROUP_NAME' => $group_name, ! 'EMAIL_SIG' => str_replace('
', "\n", "-- \n" . $board_config['board_email_sig']), 'U_GROUPCP' => $server_url . '?' . POST_GROUPS_URL . "=$group_id") ); --- 707,727 ---- include($phpbb_root_path . 'includes/emailer.'.$phpEx); $emailer = new emailer($board_config['smtp_delivery']); ! $emailer->from($board_config['board_email']); ! $emailer->replyto($board_config['board_email']); ! ! for ($i = 0; $i < count($bcc_list); $i++) ! { ! $emailer->bcc($bcc_list[$i]); ! } $emailer->use_template('group_approved'); ! $emailer->set_subject($lang['Group_approved']); $emailer->assign_vars(array( 'SITENAME' => $board_config['sitename'], 'GROUP_NAME' => $group_name, ! 'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('
', "\n", "-- \n" . $board_config['board_email_sig']) : '', 'U_GROUPCP' => $server_url . '?' . POST_GROUPS_URL . "=$group_id") ); *************** *** 899,904 **** --- 896,903 ---- generate_user_info($group_moderator, $board_config['default_dateformat'], $is_moderator, $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); + $s_hidden_fields .= ''; + $template->assign_vars(array( 'L_GROUP_INFORMATION' => $lang['Group_Information'], 'L_GROUP_NAME' => $lang['Group_name'], *************** *** 1243,1249 **** $template->assign_block_vars('switch_groups_remaining', array() ); } ! $s_hidden_fields = ''; $template->assign_vars(array( 'L_GROUP_MEMBERSHIP_DETAILS' => $lang['Group_member_details'], --- 1242,1248 ---- $template->assign_block_vars('switch_groups_remaining', array() ); } ! $s_hidden_fields = ''; $template->assign_vars(array( 'L_GROUP_MEMBERSHIP_DETAILS' => $lang['Group_member_details'], diff -crbB phpbb203/includes/auth.php phpbb206/includes/auth.php *** phpbb203/includes/auth.php Sun Jun 15 14:32:15 2003 --- phpbb206/includes/auth.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: auth.php,v 1.37.2.1 2002/05/13 01:30:59 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: auth.php,v 1.37.2.3 2003/02/25 16:02:59 acydburn Exp $ * * ***************************************************************************/ *************** *** 129,135 **** if ( !($f_access = $db->$sql_fetchrow($result)) ) { ! message_die(GENERAL_ERROR, 'No forum access control lists exist', '', __LINE__, __FILE__, $sql); } $db->sql_freeresult($result); --- 129,136 ---- if ( !($f_access = $db->$sql_fetchrow($result)) ) { ! $db->sql_freeresult($result); ! return array(); } $db->sql_freeresult($result); *************** *** 199,205 **** { case AUTH_ALL: $auth_user[$key] = TRUE; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; break; case AUTH_REG: --- 200,206 ---- { case AUTH_ALL: $auth_user[$key] = TRUE; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_Users']; break; case AUTH_REG: *************** *** 238,244 **** { case AUTH_ALL: $auth_user[$f_forum_id][$key] = TRUE; ! $auth_user[$f_forum_id][$key . '_type'] = $lang['Auth_Anonymous_users']; break; case AUTH_REG: --- 239,245 ---- { case AUTH_ALL: $auth_user[$f_forum_id][$key] = TRUE; ! $auth_user[$f_forum_id][$key . '_type'] = $lang['Auth_Anonymous_Users']; break; case AUTH_REG: diff -crbB phpbb203/includes/bbcode.php phpbb206/includes/bbcode.php *** phpbb203/includes/bbcode.php Sun Jun 15 14:32:15 2003 --- phpbb206/includes/bbcode.php Wed Sep 10 18:37:50 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: bbcode.php,v 1.36.2.11 2002/07/19 15:28:49 psotfx Exp $ * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: bbcode.php,v 1.36.2.27 2003/06/09 20:01:18 psotfx Exp $ * ***************************************************************************/ *************** *** 95,111 **** $bbcode_tpl['img'] = str_replace('{URL}', '\\1', $bbcode_tpl['img']); // We do URLs in several different ways.. ! $bbcode_tpl['url1'] = str_replace('{URL}', '\\1\\2', $bbcode_tpl['url']); ! $bbcode_tpl['url1'] = str_replace('{DESCRIPTION}', '\\1\\2', $bbcode_tpl['url1']); $bbcode_tpl['url2'] = str_replace('{URL}', 'http://\\1', $bbcode_tpl['url']); $bbcode_tpl['url2'] = str_replace('{DESCRIPTION}', '\\1', $bbcode_tpl['url2']); ! $bbcode_tpl['url3'] = str_replace('{URL}', '\\1\\2', $bbcode_tpl['url']); ! $bbcode_tpl['url3'] = str_replace('{DESCRIPTION}', '\\3', $bbcode_tpl['url3']); $bbcode_tpl['url4'] = str_replace('{URL}', 'http://\\1', $bbcode_tpl['url']); ! $bbcode_tpl['url4'] = str_replace('{DESCRIPTION}', '\\2', $bbcode_tpl['url4']); $bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']); --- 95,111 ---- $bbcode_tpl['img'] = str_replace('{URL}', '\\1', $bbcode_tpl['img']); // We do URLs in several different ways.. ! $bbcode_tpl['url1'] = str_replace('{URL}', '\\1', $bbcode_tpl['url']); ! $bbcode_tpl['url1'] = str_replace('{DESCRIPTION}', '\\1', $bbcode_tpl['url1']); $bbcode_tpl['url2'] = str_replace('{URL}', 'http://\\1', $bbcode_tpl['url']); $bbcode_tpl['url2'] = str_replace('{DESCRIPTION}', '\\1', $bbcode_tpl['url2']); ! $bbcode_tpl['url3'] = str_replace('{URL}', '\\1', $bbcode_tpl['url']); ! $bbcode_tpl['url3'] = str_replace('{DESCRIPTION}', '\\2', $bbcode_tpl['url3']); $bbcode_tpl['url4'] = str_replace('{URL}', 'http://\\1', $bbcode_tpl['url']); ! $bbcode_tpl['url4'] = str_replace('{DESCRIPTION}', '\\3', $bbcode_tpl['url4']); $bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']); *************** *** 149,154 **** --- 149,162 ---- // [CODE] and [/CODE] for posting code (HTML, PHP, C etc etc) in your posts. $text = bbencode_second_pass_code($text, $uid, $bbcode_tpl); + // [QUOTE] and [/QUOTE] for posting replies with quote, or just for quoting stuff. + $text = str_replace("[quote:$uid]", $bbcode_tpl['quote_open'], $text); + $text = str_replace("[/quote:$uid]", $bbcode_tpl['quote_close'], $text); + + // New one liner to deal with opening quotes with usernames... + // replaces the two line version that I had here before.. + $text = preg_replace("/\[quote:$uid=\"(.*?)\"\]/si", $bbcode_tpl['quote_username_open'], $text); + // [list] and [list=x] for (un)ordered lists. // unordered lists $text = str_replace("[list:$uid]", $bbcode_tpl['ulist_open'], $text); *************** *** 165,181 **** $text = str_replace("[/color:$uid]", $bbcode_tpl['color_close'], $text); // size ! $text = preg_replace("/\[size=([\-\+]?[1-2]?[0-9]):$uid\]/si", $bbcode_tpl['size_open'], $text); $text = str_replace("[/size:$uid]", $bbcode_tpl['size_close'], $text); - // [QUOTE] and [/QUOTE] for posting replies with quote, or just for quoting stuff. - $text = str_replace("[quote:$uid]", $bbcode_tpl['quote_open'], $text); - $text = str_replace("[/quote:$uid]", $bbcode_tpl['quote_close'], $text); - - // New one liner to deal with opening quotes with usernames... - // replaces the two line version that I had here before.. - $text = preg_replace("/\[quote:$uid=(?:\"?([^\"]*)\"?)\]/si", $bbcode_tpl['quote_username_open'], $text); - // [b] and [/b] for bolding text. $text = str_replace("[b:$uid]", $bbcode_tpl['b_open'], $text); $text = str_replace("[/b:$uid]", $bbcode_tpl['b_close'], $text); --- 173,181 ---- $text = str_replace("[/color:$uid]", $bbcode_tpl['color_close'], $text); // size ! $text = preg_replace("/\[size=([1-2]?[0-9]):$uid\]/si", $bbcode_tpl['size_open'], $text); $text = str_replace("[/size:$uid]", $bbcode_tpl['size_close'], $text); // [b] and [/b] for bolding text. $text = str_replace("[b:$uid]", $bbcode_tpl['b_open'], $text); $text = str_replace("[/b:$uid]", $bbcode_tpl['b_close'], $text); *************** *** 194,221 **** // [img]image_url_here[/img] code.. // This one gets first-passed.. ! $patterns[0] = "#\[img:$uid\](.*?)\[/img:$uid\]#si"; ! $replacements[0] = $bbcode_tpl['img']; ! // [url]xxxx://www.phpbb.com[/url] code.. ! $patterns[1] = "#\[url\]([a-z]+?://){1}([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+\(\)]+)\[/url\]#si"; ! $replacements[1] = $bbcode_tpl['url1']; // [url]www.phpbb.com[/url] code.. (no xxxx:// prefix). ! $patterns[2] = "#\[url\]([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+\(\)]+)\[/url\]#si"; ! $replacements[2] = $bbcode_tpl['url2']; // [url=xxxx://www.phpbb.com]phpBB[/url] code.. ! $patterns[3] = "#\[url=([a-z]+?://){1}([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+\(\)]+)\](.*?)\[/url\]#si"; ! $replacements[3] = $bbcode_tpl['url3']; // [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix). ! $patterns[4] = "#\[url=([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+\(\)]+)\](.*?)\[/url\]#si"; ! $replacements[4] = $bbcode_tpl['url4']; // [email]user@domain.tld[/email] code.. ! $patterns[5] = "#\[email\]([a-z0-9\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#si"; ! $replacements[5] = $bbcode_tpl['email']; $text = preg_replace($patterns, $replacements, $text); --- 194,221 ---- // [img]image_url_here[/img] code.. // This one gets first-passed.. ! $patterns[] = "#\[img:$uid\](.*?)\[/img:$uid\]#si"; ! $replacements[] = $bbcode_tpl['img']; ! // matches a [url]xxxx://www.phpbb.com[/url] code.. ! $patterns[] = "#\[url\]([\w]+?://[^ \"\n\r\t<]*?)\[/url\]#is"; ! $replacements[] = $bbcode_tpl['url1']; // [url]www.phpbb.com[/url] code.. (no xxxx:// prefix). ! $patterns[] = "#\[url\]((www|ftp)\.[^ \"\n\r\t<]*?)\[/url\]#is"; ! $replacements[] = $bbcode_tpl['url2']; // [url=xxxx://www.phpbb.com]phpBB[/url] code.. ! $patterns[] = "#\[url=([\w]+?://[^ \"\n\r\t<]*?)\](.*?)\[/url\]#is"; ! $replacements[] = $bbcode_tpl['url3']; // [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix). ! $patterns[] = "#\[url=((www|ftp)\.[^ \"\n\r\t<]*?)\](.*?)\[/url\]#is"; ! $replacements[] = $bbcode_tpl['url4']; // [email]user@domain.tld[/email] code.. ! $patterns[] = "#\[email\]([a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#si"; ! $replacements[] = $bbcode_tpl['email']; $text = preg_replace($patterns, $replacements, $text); *************** *** 250,257 **** // [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=(\\\\"[^"]*?\\\\")\]/is', '[/quote]', '', false, '', "[quote:$uid=\\1]"); // [list] and [list=x] for (un)ordered lists. $open_tag = array(); --- 250,256 ---- // [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=(\\\".*?\\\")\]/is', '[/quote]', '', false, '', "[quote:$uid=\\1]"); // [list] and [list=x] for (un)ordered lists. $open_tag = array(); *************** *** 270,276 **** $text = preg_replace("#\[color=(\#[0-9A-F]{6}|[a-z\-]+)\](.*?)\[/color\]#si", "[color=\\1:$uid]\\2[/color:$uid]", $text); // [size] and [/size] for setting text size ! $text = preg_replace("#\[size=([\-\+]?[1-2]?[0-9])\](.*?)\[/size\]#si", "[size=\\1:$uid]\\2[/size:$uid]", $text); // [b] and [/b] for bolding text. $text = preg_replace("#\[b\](.*?)\[/b\]#si", "[b:$uid]\\1[/b:$uid]", $text); --- 269,275 ---- $text = preg_replace("#\[color=(\#[0-9A-F]{6}|[a-z\-]+)\](.*?)\[/color\]#si", "[color=\\1:$uid]\\2[/color:$uid]", $text); // [size] and [/size] for setting text size ! $text = preg_replace("#\[size=([1-2]?[0-9])\](.*?)\[/size\]#si", "[size=\\1:$uid]\\2[/size:$uid]", $text); // [b] and [/b] for bolding text. $text = preg_replace("#\[b\](.*?)\[/b\]#si", "[b:$uid]\\1[/b:$uid]", $text); *************** *** 282,294 **** $text = preg_replace("#\[i\](.*?)\[/i\]#si", "[i:$uid]\\1[/i:$uid]", $text); // [img]image_url_here[/img] code.. ! $text = preg_replace("#\[img\](http(s)?://)([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]+)\[/img\]#si", "[img:$uid]\\1\\3[/img:$uid]", $text); // Remove our padding from the string.. ! $text = substr($text, 1); ! ! ! return $text; } // bbencode_first_pass() --- 281,290 ---- $text = preg_replace("#\[i\](.*?)\[/i\]#si", "[i:$uid]\\1[/i:$uid]", $text); // [img]image_url_here[/img] code.. ! $text = preg_replace("#\[img\]((ht|f)tp://)([^\r\n\t<\"]*?)\[/img\]#sie", "'[img:$uid]\\1' . str_replace(' ', '%20', '\\3') . '[/img:$uid]'", $text); // Remove our padding from the string.. ! return substr($text, 1);; } // bbencode_first_pass() *************** *** 386,411 **** for ($i = 0; $i < $open_tag_count; $i++) { // Grab everything until the first "]"... ! $possible_start = substr($text, $curr_pos, strpos($text, "]", $curr_pos + 1) - $curr_pos + 1); // // We're going to try and catch usernames with "[' characters. // ! if( preg_match('/\[quote\=\\\\"/si', $possible_start) && !preg_match('/\[quote=\\\\"[^"]*\\\\"\]/si', $possible_start) ) { - // // OK we are in a quote tag that probably contains a ] bracket. // Grab a bit more of the string to hopefully get all of it.. ! // ! $possible_start = substr($text, $curr_pos, strpos($text, "\"]", $curr_pos + 1) - $curr_pos + 2); } - // - // Now compare, either using regexp or not. if ($open_is_regexp) { $match_result = array(); - // PREG regexp comparison. if (preg_match($open_tag[$i], $possible_start, $match_result)) { $found_start = true; --- 382,409 ---- for ($i = 0; $i < $open_tag_count; $i++) { // Grab everything until the first "]"... ! $possible_start = substr($text, $curr_pos, strpos($text, ']', $curr_pos + 1) - $curr_pos + 1); // // We're going to try and catch usernames with "[' characters. // ! if( preg_match('#\[quote=\\\"#si', $possible_start, $match) && !preg_match('#\[quote=\\\"(.*?)\\\"\]#si', $possible_start) ) { // OK we are in a quote tag that probably contains a ] bracket. // Grab a bit more of the string to hopefully get all of it.. ! if ($close_pos = strpos($text, '"]', $curr_pos + 9)) ! { ! if (strpos(substr($text, $curr_pos + 9, $close_pos - ($curr_pos + 9)), '[quote') === false) ! { ! $possible_start = substr($text, $curr_pos, $close_pos - $curr_pos + 2); ! } ! } } + // Now compare, either using regexp or not. if ($open_is_regexp) { $match_result = array(); if (preg_match($open_tag[$i], $possible_start, $match_result)) { $found_start = true; *************** *** 439,445 **** // Keeps error in nested tag from breaking out // of table structure.. // ! $curr_pos = $curr_pos + strlen($possible_start); } else { --- 437,443 ---- // Keeps error in nested tag from breaking out // of table structure.. // ! $curr_pos += strlen($possible_start); } else { *************** *** 522,529 **** { $match = bbcode_array_pop($stack); $curr_pos = $match['pos']; ! bbcode_array_push($stack, $match); ! ++$curr_pos; } else { --- 520,527 ---- { $match = bbcode_array_pop($stack); $curr_pos = $match['pos']; ! // bbcode_array_push($stack, $match); ! // ++$curr_pos; } else { *************** *** 581,586 **** --- 579,587 ---- // Replace tabs with "   " so tabbed code indents sorta right without making huge long lines. $after_replace = str_replace("\t", "   ", $after_replace); + // now Replace space occurring at the beginning of a line + $after_replace = preg_replace("/^ {1}/m", ' ', $after_replace); + $str_to_match = "[code:1:$uid]" . $before_replace . "[/code:1:$uid]"; $replacement = $code_start_html; *************** *** 615,638 **** { // pad it with a space so we can match things at the start of the 1st line. ! $ret = " " . $text; // matches an "xxxx://yyyy" URL at the start of a line, or after a space. // xxxx can only be alpha characters. ! // yyyy is anything up to the first space, newline, or comma. ! $ret = preg_replace("#([\n ])([a-z]+?)://([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]+)#i", "\\1\\2://\\3", $ret); ! // matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing // Must contain at least 2 dots. xxxx contains either alphanum, or "-" ! // yyyy contains either alphanum, "-", or "." ! // 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 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\-.\~]+)((?:/[a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]*)?)#i", "\\1www.\\2.\\3\\4", $ret); // 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 ".". ! $ret = preg_replace("#([\n ])([a-z0-9\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)?[\w]+)#i", "\\1\\2@\\3", $ret); // Remove our padding.. $ret = substr($ret, 1); --- 616,637 ---- { // pad it with a space so we can match things at the start of the 1st line. ! $ret = ' ' . $text; // matches an "xxxx://yyyy" URL at the start of a line, or after a space. // xxxx can only be alpha characters. ! // yyyy is anything up to the first space, newline, comma, double quote or < ! $ret = preg_replace("#(^|[\n ])([\w]+?://[^ \"\n\r\t<]*)#is", "\\1\\2", $ret); ! // matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing // Must contain at least 2 dots. xxxx contains either alphanum, or "-" ! // zzzz is optional.. will contain everything up to the first space, newline, ! // comma, double quote or <. ! $ret = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r<]*)#is", "\\1\\2", $ret); // 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 ".". ! $ret = preg_replace("#(^|[\n ])([a-z0-9&\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", "\\1\\2@\\3", $ret); // Remove our padding.. $ret = substr($ret, 1); *************** *** 745,762 **** global $db, $board_config; $orig = $repl = array(); ! $sql = 'SELECT code, smile_url FROM ' . SMILIES_TABLE; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Couldn't obtain smilies data", "", __LINE__, __FILE__, $sql); } $smilies = $db->sql_fetchrowset($result); usort($smilies, 'smiley_sort'); ! for($i = 0; $i < count($smilies); $i++) { $orig[] = "/(?<=.\W|\W.|^\W)" . phpbb_preg_quote($smilies[$i]['code'], "/") . "(?=.\W|\W.|\W$)/"; ! $repl[] = '' . $smilies[$i]['smile_url'] . ''; } } --- 744,765 ---- global $db, $board_config; $orig = $repl = array(); ! $sql = 'SELECT * FROM ' . SMILIES_TABLE; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Couldn't obtain smilies data", "", __LINE__, __FILE__, $sql); } $smilies = $db->sql_fetchrowset($result); + if (count($smilies)) + { usort($smilies, 'smiley_sort'); ! } ! ! for ($i = 0; $i < count($smilies); $i++) { $orig[] = "/(?<=.\W|\W.|^\W)" . phpbb_preg_quote($smilies[$i]['code'], "/") . "(?=.\W|\W.|\W$)/"; ! $repl[] = '' . $smilies[$i]['emoticon'] . ''; } } *************** *** 765,770 **** --- 768,774 ---- $message = preg_replace($orig, $repl, ' ' . $message . ' '); $message = substr($message, 1, -1); } + return $message; } diff -crbB phpbb203/includes/constants.php phpbb206/includes/constants.php *** phpbb203/includes/constants.php Sun Jun 15 14:32:15 2003 --- phpbb206/includes/constants.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : ('C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: constants.php,v 1.47.2.1 2002/07/29 05:04:04 dougk_ff7 Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : ('C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: constants.php,v 1.47.2.4 2003/06/10 00:39:51 psotfx Exp $ * * ***************************************************************************/ *************** *** 27,33 **** // Debug Level //define('DEBUG', 1); // Debugging on ! define('DEBUG', 0); // Debugging off // User Levels <- Do not change the values of USER or ADMIN --- 27,33 ---- // Debug Level //define('DEBUG', 1); // Debugging on ! define('DEBUG', 1); // Debugging off // User Levels <- Do not change the values of USER or ADMIN diff -crbB phpbb203/includes/emailer.php phpbb206/includes/emailer.php *** phpbb203/includes/emailer.php Sun Jun 15 14:32:15 2003 --- phpbb206/includes/emailer.php Wed Sep 10 18:37:50 2003 *************** *** 6,12 **** copyright : (C) 2001 The phpBB Group email : support@phpbb.com ! $Id: emailer.php,v 1.15.2.6 2002/08/07 22:36:33 dougk_ff7 Exp $ ***************************************************************************/ --- 6,12 ---- copyright : (C) 2001 The phpBB Group email : support@phpbb.com ! $Id: emailer.php,v 1.15.2.34 2003/07/26 11:41:35 acydburn Exp $ ***************************************************************************/ *************** *** 26,185 **** // class emailer { ! var $tpl_file; var $use_smtp; ! var $msg; ! var $mimeOut; ! var $arrPlaceHolders = array(); // an associative array that has the key = placeHolderName and val = placeHolderValue. ! var $subject, $extra_headers, $address; function emailer($use_smtp) { $this->use_smtp = $use_smtp; ! $this->tpl_file = NULL; ! $this->address = NULL; ! $this->msg = ''; ! $this->mimeOut = ''; } - // // Resets all the data (address, template file, etc etc to default - // function reset() { ! $this->tpl_file = ''; ! $this->address = ''; ! $this->msg = ''; ! $this->memOut = ''; ! $this->vars = ''; } - // // Sets an email address to send to - // function email_address($address) { ! $this->address = ''; ! $this->address .= $address; } - // // set up subject for mail - // function set_subject($subject = '') { ! $this->subject = $subject; } - // // set up extra mail headers - // function extra_headers($headers) { ! $this->extra_headers = $headers; } function use_template($template_file, $template_lang = '') { global $board_config, $phpbb_root_path; ! if ( $template_lang == '' ) { ! $template_lang = $board_config['default_lang']; } ! $this->tpl_file = $phpbb_root_path . 'language/lang_' . $template_lang . '/email/' . $template_file . '.tpl'; ! if ( !file_exists($this->tpl_file) ) { ! message_die(GENERAL_ERROR, 'Could not find email template file ' . $template_file, '', __LINE__, __FILE__); } ! if ( !$this->load_msg() ) { ! message_die(GENERAL_ERROR, 'Could not load email template file ' . $template_file, '', __LINE__, __FILE__); ! } ! ! return true; ! } ! // ! // Open the template file and read in the message ! // ! function load_msg() { ! if ( $this->tpl_file == NULL ) { ! message_die(GENERAL_ERROR, 'No template file set', '', __LINE__, __FILE__); } ! if ( !($fd = fopen($this->tpl_file, 'r')) ) { ! message_die(GENERAL_ERROR, 'Failed opening template file', '', __LINE__, __FILE__); } ! $this->msg .= fread($fd, filesize($this->tpl_file)); fclose($fd); return true; } function assign_vars($vars) { ! $this->vars = ( empty($this->vars) ) ? $vars : $this->vars . $vars; } ! function parse_email() ! { ! global $lang; ! @reset($this->vars); ! while (list($key, $val) = @each($this->vars)) { ! $$key = $val; ! } // Escape all quotes, else the eval will fail. $this->msg = str_replace ("'", "\'", $this->msg); $this->msg = preg_replace('#\{([a-z0-9\-_]*?)\}#is', "' . $\\1 . '", $this->msg); eval("\$this->msg = '$this->msg';"); ! // // We now try and pull a subject from the email body ... if it exists, // do this here because the subject may contain a variable ! // $match = array(); ! preg_match("/^(Subject:(.*?)[\r\n]+?)?(Charset:(.*?)[\r\n]+?)?(.*?)$/is", $this->msg, $match); ! ! $this->msg = ( isset($match[5]) ) ? trim($match[5]) : ''; ! $this->subject = ( $this->subject != '' ) ? $this->subject : trim($match[2]); ! $this->encoding = ( trim($match[4]) != '' ) ? trim($match[4]) : $lang['ENCODING']; ! ! return true; } ! ! // ! // Send the mail out to the recipients set previously in var $this->address ! // ! function send() { ! global $phpEx, $phpbb_root_path; ! if ( $this->address == NULL ) { ! message_die(GENERAL_ERROR, 'No email address set', '', __LINE__, __FILE__); } ! 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') ) --- 26,200 ---- // class emailer { ! var $msg, $subject, $extra_headers; ! var $addresses, $reply_to, $from; var $use_smtp; ! ! var $tpl_msg = array(); function emailer($use_smtp) { + $this->reset(); $this->use_smtp = $use_smtp; ! $this->reply_to = $this->from = ''; } // Resets all the data (address, template file, etc etc to default function reset() { ! $this->addresses = array(); ! $this->vars = $this->msg = $this->extra_headers = ''; } // Sets an email address to send to function email_address($address) { ! $this->addresses['to'] = trim($address); ! } ! ! function cc($address) ! { ! $this->addresses['cc'][] = trim($address); ! } ! ! function bcc($address) ! { ! $this->addresses['bcc'][] = trim($address); ! } ! ! function replyto($address) ! { ! $this->reply_to = trim($address); ! } ! ! function from($address) ! { ! $this->from = trim($address); } // set up subject for mail function set_subject($subject = '') { ! $this->subject = trim(preg_replace('#[\n\r]+#s', '', $subject)); } // set up extra mail headers function extra_headers($headers) { ! $this->extra_headers .= trim($headers) . "\n"; } function use_template($template_file, $template_lang = '') { global $board_config, $phpbb_root_path; ! if (trim($template_file) == '') { ! message_die(GENERAL_ERROR, 'No template file set', '', __LINE__, __FILE__); } ! if (trim($template_lang) == '') { ! $template_lang = $board_config['default_lang']; } ! if (empty($this->tpl_msg[$template_lang . $template_file])) { ! $tpl_file = $phpbb_root_path . 'language/lang_' . $template_lang . '/email/' . $template_file . '.tpl'; ! if (!@file_exists(@phpbb_realpath($tpl_file))) { ! $tpl_file = $phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/email/' . $template_file . '.tpl'; ! ! if (!@file_exists(@phpbb_realpath($tpl_file))) { ! message_die(GENERAL_ERROR, 'Could not find email template file :: ' . $template_file, '', __LINE__, __FILE__); ! } } ! if (!($fd = @fopen($tpl_file, 'r'))) { ! message_die(GENERAL_ERROR, 'Failed opening template file :: ' . $tpl_file, '', __LINE__, __FILE__); } ! $this->tpl_msg[$template_lang . $template_file] = fread($fd, filesize($tpl_file)); fclose($fd); + } + + $this->msg = $this->tpl_msg[$template_lang . $template_file]; return true; } + // assign variables function assign_vars($vars) { ! $this->vars = (empty($this->vars)) ? $vars : $this->vars . $vars; } ! // Send the mail out to the recipients set previously in var $this->address ! function send() { ! global $board_config, $lang, $phpEx, $phpbb_root_path, $db; // Escape all quotes, else the eval will fail. $this->msg = str_replace ("'", "\'", $this->msg); $this->msg = preg_replace('#\{([a-z0-9\-_]*?)\}#is', "' . $\\1 . '", $this->msg); + // Set vars + reset ($this->vars); + while (list($key, $val) = each($this->vars)) + { + $$key = $val; + } + eval("\$this->msg = '$this->msg';"); ! // Clear vars ! reset ($this->vars); ! while (list($key, $val) = each($this->vars)) ! { ! unset($$key); ! } ! // We now try and pull a subject from the email body ... if it exists, // do this here because the subject may contain a variable ! $drop_header = ''; $match = array(); ! if (preg_match('#^(Subject:(.*?))$#m', $this->msg, $match)) ! { ! $this->subject = (trim($match[2]) != '') ? trim($match[2]) : (($this->subject != '') ? $this->subject : 'No Subject'); ! $drop_header .= '[\r\n]*?' . phpbb_preg_quote($match[1], '#'); } ! else { ! $this->subject = (($this->subject != '') ? $this->subject : 'No Subject'); ! } ! if (preg_match('#^(Charset:(.*?))$#m', $this->msg, $match)) ! { ! $this->encoding = (trim($match[2]) != '') ? trim($match[2]) : trim($lang['ENCODING']); ! $drop_header .= '[\r\n]*?' . phpbb_preg_quote($match[1], '#'); ! } ! else { ! $this->encoding = trim($lang['ENCODING']); } ! if ($drop_header != '') { ! $this->msg = trim(preg_replace('#' . $drop_header . '#s', '', $this->msg)); } ! $to = $this->addresses['to']; ! ! $cc = (count($this->addresses['cc'])) ? implode(', ', $this->addresses['cc']) : ''; ! $bcc = (count($this->addresses['bcc'])) ? implode(', ', $this->addresses['bcc']) : ''; + // Build header + $this->extra_headers = (($this->reply_to != '') ? "Reply-to: $this->reply_to\n" : '') . (($this->from != '') ? "From: $this->from\n" : "From: " . $board_config['board_email'] . "\n") . "Return-Path: " . $board_config['board_email'] . "\nMessage-ID: <" . md5(uniqid(time())) . "@" . $board_config['server_name'] . ">\nMIME-Version: 1.0\nContent-type: text/plain; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . date('r', time()) . "\nX-Priority: 3\nX-MSMail-Priority: Normal\nX-Mailer: PHP\nX-MimeOLE: Produced By phpBB2\n" . $this->extra_headers . (($cc != '') ? "Cc: $cc\n" : '') . (($bcc != '') ? "Bcc: $bcc\n" : ''); + + // Send message ... removed $this->encode() from subject for time being if ( $this->use_smtp ) { if ( !defined('SMTP_INCLUDED') ) *************** *** 187,207 **** include($phpbb_root_path . 'includes/smtp.' . $phpEx); } ! $result = smtpmail($this->address, $this->subject, $this->msg, $this->extra_headers); } else { ! $result = @mail($this->address, $this->subject, $this->msg, $this->extra_headers); } ! if ( !$result ) { ! message_die(GENERAL_ERROR, 'Failed sending email', '', __LINE__, __FILE__); } return true; } // // Attach files via MIME. --- 202,270 ---- include($phpbb_root_path . 'includes/smtp.' . $phpEx); } ! $result = smtpmail($to, $this->subject, $this->msg, $this->extra_headers); } else { ! $empty_to_header = ($to == '') ? TRUE : FALSE; ! $to = ($to == '') ? (($board_config['sendmail_fix']) ? ' ' : 'Undisclosed-recipients:;') : $to; ! ! $result = @mail($to, $this->subject, preg_replace("#(?msg), $this->extra_headers); ! ! if (!$result && !$board_config['sendmail_fix'] && $empty_to_header) ! { ! $to = ' '; ! ! $sql = "UPDATE " . CONFIG_TABLE . " ! SET config_value = '1' ! WHERE config_name = 'sendmail_fix'"; ! if (!$db->sql_query($sql)) ! { ! message_die(GENERAL_ERROR, 'Unable to update config table', '', __LINE__, __FILE__, $sql); } ! $board_config['sendmail_fix'] = 1; ! $result = @mail($to, $this->subject, preg_replace("#(?msg), $this->extra_headers); ! } ! } ! ! // Did it work? ! if (!$result) { ! message_die(GENERAL_ERROR, 'Failed sending email :: ' . (($this->use_smtp) ? 'SMTP' : 'PHP') . ' :: ' . $result, '', __LINE__, __FILE__); } return true; } + // Encodes the given string for proper display for this encoding ... nabbed + // from php.net and modified. There is an alternative encoding method which + // may produce lesd output but it's questionable as to its worth in this + // scenario IMO + function encode($str) + { + if ($this->encoding == '') + { + return $str; + } + + // define start delimimter, end delimiter and spacer + $end = "?="; + $start = "=?$this->encoding?B?"; + $spacer = "$end\r\n $start"; + + // determine length of encoded text within chunks and ensure length is even + $length = 75 - strlen($start) - strlen($end); + $length = floor($length / 2) * 2; + + // encode the string and split it into chunks with spacers after each chunk + $str = chunk_split(base64_encode($str), $length, $spacer); + + // remove trailing spacer and add start and end delimiters + $str = preg_replace('#' . phpbb_preg_quote($spacer, '#') . '$#', '', $str); + + return $start . $str . $end; + } // // Attach files via MIME. *************** *** 211,217 **** global $lang; $mime_boundary = "--==================_846811060==_"; ! $this->mailMsg = '--' . $mime_boundary . "\nContent-Type: text/plain;\n\tcharset=\"" . $lang['ENCODING'] . "\"\n\n" . $this->mailMsg; if ($mime_filename) { --- 274,280 ---- global $lang; $mime_boundary = "--==================_846811060==_"; ! $this->msg = '--' . $mime_boundary . "\nContent-Type: text/plain;\n\tcharset=\"" . $lang['ENCODING'] . "\"\n\n" . $this->msg; if ($mime_filename) { *************** *** 294,300 **** // function encode_file($sourcefile) { ! if (is_readable($sourcefile)) { $fd = fopen($sourcefile, "r"); $contents = fread($fd, filesize($sourcefile)); --- 357,363 ---- // function encode_file($sourcefile) { ! if (is_readable(phpbb_realpath($sourcefile))) { $fd = fopen($sourcefile, "r"); $contents = fread($fd, filesize($sourcefile)); diff -crbB phpbb203/includes/functions.php phpbb206/includes/functions.php *** phpbb203/includes/functions.php Sun Jun 15 14:32:15 2003 --- phpbb206/includes/functions.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: functions.php,v 1.133.2.5 2002/07/08 10:30:41 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: functions.php,v 1.133.2.31 2003/07/20 13:14:27 acydburn Exp $ * * ***************************************************************************/ *************** *** 74,87 **** return false; } ! function get_userdata($user) { global $db; $sql = "SELECT * FROM " . USERS_TABLE . " WHERE "; ! $sql .= ( ( is_integer($user) ) ? "user_id = $user" : "username = '" . str_replace("\'", "''", $user) . "'" ) . " AND user_id <> " . ANONYMOUS; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Tried obtaining data for a non-existent user', '', __LINE__, __FILE__, $sql); --- 74,101 ---- return false; } ! // ! // Get Userdata, $user can be username or user_id. If force_str is true, the username will be forced. ! // ! function get_userdata($user, $force_str = false) { global $db; + if (intval($user) == 0 || $force_str) + { + $user = trim(htmlspecialchars($user)); + $user = substr(str_replace("\\'", "'", $user), 0, 25); + $user = str_replace("'", "\\'", $user); + } + else + { + $user = intval($user); + } + $sql = "SELECT * FROM " . USERS_TABLE . " WHERE "; ! $sql .= ( ( is_integer($user) ) ? "user_id = $user" : "username = '" . $user . "'" ) . " AND user_id <> " . ANONYMOUS; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Tried obtaining data for a non-existent user', '', __LINE__, __FILE__, $sql); *************** *** 92,98 **** function make_jumpbox($action, $match_forum_id = 0) { ! global $template, $lang, $db, $SID, $nav_links, $phpEx; // $is_auth = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata); --- 106,112 ---- function make_jumpbox($action, $match_forum_id = 0) { ! global $template, $userdata, $lang, $db, $nav_links, $phpEx, $SID; // $is_auth = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata); *************** *** 122,128 **** message_die(GENERAL_ERROR, 'Could not obtain forums information', '', __LINE__, __FILE__, $sql); } ! $boxstring = ''; $forum_rows = array(); while ( $row = $db->sql_fetchrow($result) ) *************** *** 171,182 **** } else { ! $boxstring .= ''; } ! if ( isset($SID) ) { ! $boxstring .= ''; } $template->set_filenames(array( --- 185,196 ---- } else { ! $boxstring .= ''; } ! if ( !empty($SID) ) { ! $boxstring .= ''; } $template->set_filenames(array( *************** *** 201,206 **** --- 215,221 ---- { global $board_config, $theme, $images; global $template, $lang, $phpEx, $phpbb_root_path; + global $nav_links; if ( $userdata['user_id'] != ANONYMOUS ) { *************** *** 220,226 **** } } ! if ( !file_exists($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.'.$phpEx) ) { $board_config['default_lang'] = 'english'; } --- 235,241 ---- } } ! if ( !file_exists(@phpbb_realpath($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.'.$phpEx)) ) { $board_config['default_lang'] = 'english'; } *************** *** 229,235 **** if ( defined('IN_ADMIN') ) { ! if( !file_exists($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.'.$phpEx) ) { $board_config['default_lang'] = 'english'; } --- 244,250 ---- if ( defined('IN_ADMIN') ) { ! if( !file_exists(@phpbb_realpath($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.'.$phpEx)) ) { $board_config['default_lang'] = 'english'; } *************** *** 253,258 **** --- 268,296 ---- $theme = setup_style($board_config['default_style']); + // + // Mozilla navigation bar + // Default items that should be valid on all pages. + // Defined here to correctly assign the Language Variables + // and be able to change the variables within code. + // + $nav_links['top'] = array ( + 'url' => append_sid($phpbb_root_path . 'index.' . $phpEx), + 'title' => sprintf($lang['Forum_Index'], $board_config['sitename']) + ); + $nav_links['search'] = array ( + 'url' => append_sid($phpbb_root_path . 'search.' . $phpEx), + 'title' => $lang['Search'] + ); + $nav_links['help'] = array ( + 'url' => append_sid($phpbb_root_path . 'faq.' . $phpEx), + 'title' => $lang['FAQ'] + ); + $nav_links['author'] = array ( + 'url' => append_sid($phpbb_root_path . 'memberlist.' . $phpEx), + 'title' => $lang['Memberlist'] + ); + return; } *************** *** 276,282 **** $template_path = 'templates/' ; $template_name = $row['template_name'] ; ! $template = new Template($phpbb_root_path . $template_path . $template_name, $board_config, $db); if ( $template ) { --- 314,320 ---- $template_path = 'templates/' ; $template_name = $row['template_name'] ; ! $template = new Template($phpbb_root_path . $template_path . $template_name); if ( $template ) { *************** *** 288,294 **** message_die(CRITICAL_ERROR, "Could not open $template_name template config file", '', __LINE__, __FILE__); } ! $img_lang = ( file_exists($current_template_path . '/images/lang_' . $board_config['default_lang']) ) ? $board_config['default_lang'] : 'english'; while( list($key, $value) = @each($images) ) { --- 326,332 ---- message_die(CRITICAL_ERROR, "Could not open $template_name template config file", '', __LINE__, __FILE__); } ! $img_lang = ( file_exists(@phpbb_realpath($phpbb_root_path . $current_template_path . '/images/lang_' . $board_config['default_lang'])) ) ? $board_config['default_lang'] : 'english'; while( list($key, $value) = @each($images) ) { *************** *** 496,505 **** // 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, $gen_simple_header; global $userdata, $user_ip, $session_length; global $starttime; $sql_store = $sql; // --- 534,551 ---- // 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, $gen_simple_header, $images; global $userdata, $user_ip, $session_length; global $starttime; + if(defined('HAS_DIED')) + { + die("message_die() was called multiple times. This isn't supposed to happen. Was message_die() used in page_tail.php?"); + } + + define(HAS_DIED, 1); + + $sql_store = $sql; // *************** *** 675,678 **** --- 721,767 ---- exit; } + + // + // This function is for compatibility with PHP 4.x's realpath() + // function. In later versions of PHP, it needs to be called + // to do checks with some functions. Older versions of PHP don't + // seem to need this, so we'll just return the original value. + // dougk_ff7 + function phpbb_realpath($path) + { + global $phpbb_root_path, $phpEx; + + return (!@function_exists('realpath') || !@realpath($phpbb_root_path . 'includes/functions.'.$phpEx)) ? $path : @realpath($path); + } + + function redirect($url) + { + global $db, $board_config; + + if (!empty($db)) + { + $db->sql_close(); + } + + $server_protocol = ($board_config['cookie_secure']) ? 'https://' : 'http://'; + $server_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['server_name'])); + $server_port = ($board_config['server_port'] <> 80) ? ':' . trim($board_config['server_port']) : ''; + $script_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['script_path'])); + $script_name = ($script_name == '') ? $script_name : '/' . $script_name; + $url = preg_replace('#^\/?(.*?)\/?$#', '/\1', trim($url)); + + // Redirect via an HTML form for PITA webservers + if (@preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE'))) + { + header('Refresh: 0; URL=' . $server_protocol . $server_name . $server_port . $script_name . $url); + echo 'Redirect
If your browser does not support meta redirection please click HERE to be redirected
'; + exit; + } + + // Behave as per HTTP/1.1 spec for others + header('Location: ' . $server_protocol . $server_name . $server_port . $script_name . $url); + exit; + } + ?> \ No newline at end of file diff -crbB phpbb203/includes/functions_post.php phpbb206/includes/functions_post.php *** phpbb203/includes/functions_post.php Sun Jun 15 14:32:15 2003 --- phpbb206/includes/functions_post.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: functions_post.php,v 1.9.2.10 2002/07/19 22:18:55 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: functions_post.php,v 1.9.2.34 2003/06/09 15:45:10 psotfx Exp $ * * ***************************************************************************/ *************** *** 20,31 **** * ***************************************************************************/ ! if ( !defined('IN_PHPBB') ) { die('Hacking attempt'); } ! $html_entities_match = array('#&#', '#<#', '#>#'); $html_entities_replace = array('&', '<', '>'); $unhtml_specialchars_match = array('#>#', '#<#', '#"#', '#&#'); --- 20,31 ---- * ***************************************************************************/ ! if (!defined('IN_PHPBB')) { die('Hacking attempt'); } ! $html_entities_match = array('#&(?!(\#[0-9]+;))#', '#<#', '#>#'); $html_entities_replace = array('&', '<', '>'); $unhtml_specialchars_match = array('#>#', '#<#', '#"#', '#&#'); *************** *** 37,52 **** // function prepare_message($message, $html_on, $bbcode_on, $smile_on, $bbcode_uid = 0) { ! global $board_config; ! global $html_entities_match, $html_entities_replace; ! global $code_entities_match, $code_entities_replace; // // Clean up the message // $message = trim($message); ! if ( $html_on ) { $allowed_html_tags = split(',', $board_config['allow_html_tags']); --- 37,50 ---- // function prepare_message($message, $html_on, $bbcode_on, $smile_on, $bbcode_uid = 0) { ! global $board_config, $html_entities_match, $html_entities_replace; // // Clean up the message // $message = trim($message); ! if ($html_on) { $allowed_html_tags = split(',', $board_config['allow_html_tags']); *************** *** 55,86 **** $tmp_message = ''; $message = ' ' . $message . ' '; ! while ( $start_html = strpos($message, '<', $start_html) ) { ! $tmp_message .= preg_replace($html_entities_match, $html_entities_replace, substr($message, $end_html + 1, ( $start_html - $end_html - 1 ))); ! if ( $end_html = strpos($message, '>', $start_html) ) { $length = $end_html - $start_html + 1; $hold_string = substr($message, $start_html, $length); ! if ( ( $unclosed_open = strrpos(' ' . $hold_string, '<') ) != 1 ) { $tmp_message .= preg_replace($html_entities_match, $html_entities_replace, substr($hold_string, 0, $unclosed_open - 1)); $hold_string = substr($hold_string, $unclosed_open - 1); } $tagallowed = false; ! for($i = 0; $i < sizeof($allowed_html_tags); $i++) { $match_tag = trim($allowed_html_tags[$i]); ! if ( preg_match('/^<\/?' . $match_tag . '(?!(\s*)style(\s*)\\=)/i', $hold_string) ) { ! $tagallowed = true; } } ! $tmp_message .= ( $length && !$tagallowed ) ? preg_replace($html_entities_match, $html_entities_replace, $hold_string) : $hold_string; $start_html += $length; } --- 53,84 ---- $tmp_message = ''; $message = ' ' . $message . ' '; ! while ($start_html = strpos($message, '<', $start_html)) { ! $tmp_message .= preg_replace($html_entities_match, $html_entities_replace, substr($message, $end_html + 1, ($start_html - $end_html - 1))); ! if ($end_html = strpos($message, '>', $start_html)) { $length = $end_html - $start_html + 1; $hold_string = substr($message, $start_html, $length); ! if (($unclosed_open = strrpos(' ' . $hold_string, '<')) != 1) { $tmp_message .= preg_replace($html_entities_match, $html_entities_replace, substr($hold_string, 0, $unclosed_open - 1)); $hold_string = substr($hold_string, $unclosed_open - 1); } $tagallowed = false; ! for ($i = 0; $i < sizeof($allowed_html_tags); $i++) { $match_tag = trim($allowed_html_tags[$i]); ! if (preg_match('#^<\/?' . $match_tag . '[> ]#i', $hold_string)) { ! $tagallowed = (preg_match('#^<\/?' . $match_tag . ' .*?(style[ ]*?=|on[\w]+[ ]*?=)#i', $hold_string)) ? false : true; } } ! $tmp_message .= ($length && !$tagallowed) ? preg_replace($html_entities_match, $html_entities_replace, $hold_string) : $hold_string; $start_html += $length; } *************** *** 93,111 **** } } ! if ( $end_html != strlen($message) && $tmp_message != '' ) { $tmp_message .= preg_replace($html_entities_match, $html_entities_replace, substr($message, $end_html + 1)); } ! $message = ( $tmp_message != '' ) ? trim($tmp_message) : trim($message); } else { $message = preg_replace($html_entities_match, $html_entities_replace, $message); } ! if( $bbcode_on && $bbcode_uid != '' ) { $message = bbencode_first_pass($message, $bbcode_uid); } --- 91,109 ---- } } ! if ($end_html != strlen($message) && $tmp_message != '') { $tmp_message .= preg_replace($html_entities_match, $html_entities_replace, substr($message, $end_html + 1)); } ! $message = ($tmp_message != '') ? trim($tmp_message) : trim($message); } else { $message = preg_replace($html_entities_match, $html_entities_replace, $message); } ! if($bbcode_on && $bbcode_uid != '') { $message = bbencode_first_pass($message, $bbcode_uid); } *************** *** 128,206 **** global $board_config, $userdata, $lang, $phpEx, $phpbb_root_path; // Check username ! if ( !empty($username) ) { ! $username = htmlspecialchars(trim(strip_tags($username))); ! if ( !$userdata['session_logged_in'] || ( $userdata['session_logged_in'] && $username != $userdata['username'] ) ) { include($phpbb_root_path . 'includes/functions_validate.'.$phpEx); $result = validate_username($username); ! if ( $result['error'] ) { ! $error_msg .= ( !empty($error_msg) ) ? '
' . $result['error_msg'] : $result['error_msg']; } } } // Check subject ! if ( !empty($subject) ) { $subject = htmlspecialchars(trim($subject)); } ! else if ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['first_post'] ) ) { ! $error_msg .= ( !empty($error_msg) ) ? '
' . $lang['Empty_subject'] : $lang['Empty_subject']; } // Check message ! if ( !empty($message) ) { ! $bbcode_uid = ( $bbcode_on ) ? make_bbcode_uid() : ''; $message = prepare_message(trim($message), $html_on, $bbcode_on, $smilies_on, $bbcode_uid); } ! else if ( $mode != 'delete' && $mode != 'polldelete' ) { ! $error_msg .= ( !empty($error_msg) ) ? '
' . $lang['Empty_message'] : $lang['Empty_message']; } // // Handle poll stuff // ! if ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['first_post'] ) ) { ! $poll_length = ( isset($poll_length) ) ? max(0, intval($poll_length)) : 0; ! if ( !empty($poll_title) ) { $poll_title = htmlspecialchars(trim($poll_title)); } ! if( !empty($poll_options) ) { $temp_option_text = array(); ! while( list($option_id, $option_text) = @each($poll_options) ) { $option_text = trim($option_text); ! if ( !empty($option_text) ) { $temp_option_text[$option_id] = htmlspecialchars($option_text); } } $option_text = $temp_option_text; ! if ( count($poll_options) < 2 ) { ! $error_msg .= ( !empty($error_msg) ) ? '
' . $lang['To_few_poll_options'] : $lang['To_few_poll_options']; } ! else if ( count($poll_options) > $board_config['max_poll_options'] ) { ! $error_msg .= ( !empty($error_msg) ) ? '
' . $lang['To_many_poll_options'] : $lang['To_many_poll_options']; } ! else if ( $poll_title == '' ) { ! $error_msg .= ( !empty($error_msg) ) ? '
' . $lang['Empty_poll_title'] : $lang['Empty_poll_title']; } } } --- 126,208 ---- global $board_config, $userdata, $lang, $phpEx, $phpbb_root_path; // Check username ! if (!empty($username)) { ! $username = trim(strip_tags($username)); ! if (!$userdata['session_logged_in'] || ($userdata['session_logged_in'] && $username != $userdata['username'])) { include($phpbb_root_path . 'includes/functions_validate.'.$phpEx); $result = validate_username($username); ! if ($result['error']) { ! $error_msg .= (!empty($error_msg)) ? '
' . $result['error_msg'] : $result['error_msg']; } } + else + { + $username = ''; + } } // Check subject ! if (!empty($subject)) { $subject = htmlspecialchars(trim($subject)); } ! else if ($mode == 'newtopic' || ($mode == 'editpost' && $post_data['first_post'])) { ! $error_msg .= (!empty($error_msg)) ? '
' . $lang['Empty_subject'] : $lang['Empty_subject']; } // Check message ! if (!empty($message)) { ! $bbcode_uid = ($bbcode_on) ? make_bbcode_uid() : ''; $message = prepare_message(trim($message), $html_on, $bbcode_on, $smilies_on, $bbcode_uid); } ! else if ($mode != 'delete' && $mode != 'poll_delete') { ! $error_msg .= (!empty($error_msg)) ? '
' . $lang['Empty_message'] : $lang['Empty_message']; } // // Handle poll stuff // ! if ($mode == 'newtopic' || ($mode == 'editpost' && $post_data['first_post'])) { ! $poll_length = (isset($poll_length)) ? max(0, intval($poll_length)) : 0; ! if (!empty($poll_title)) { $poll_title = htmlspecialchars(trim($poll_title)); } ! if(!empty($poll_options)) { $temp_option_text = array(); ! while(list($option_id, $option_text) = @each($poll_options)) { $option_text = trim($option_text); ! if (!empty($option_text)) { $temp_option_text[$option_id] = htmlspecialchars($option_text); } } $option_text = $temp_option_text; ! if (count($poll_options) < 2) { ! $error_msg .= (!empty($error_msg)) ? '
' . $lang['To_few_poll_options'] : $lang['To_few_poll_options']; } ! else if (count($poll_options) > $board_config['max_poll_options']) { ! $error_msg .= (!empty($error_msg)) ? '
' . $lang['To_many_poll_options'] : $lang['To_many_poll_options']; } ! else if ($poll_title == '') { ! $error_msg .= (!empty($error_msg)) ? '
' . $lang['Empty_poll_title'] : $lang['Empty_poll_title']; } } } *************** *** 220,316 **** $current_time = time(); ! if ( $mode == 'newtopic' || $mode == 'reply' ) { // // Flood control // ! $where_sql = ( $userdata['user_id'] == ANONYMOUS ) ? "poster_ip = '$user_ip'" : 'poster_id = ' . $userdata['user_id']; $sql = "SELECT MAX(post_time) AS last_post_time FROM " . POSTS_TABLE . " WHERE $where_sql"; ! if ( $result = $db->sql_query($sql) ) { ! if ( $row = $db->sql_fetchrow($result) ) { ! if ( $row['last_post_time'] > 0 && ( $current_time - $row['last_post_time'] ) < $board_config['flood_interval'] ) { message_die(GENERAL_MESSAGE, $lang['Flood_Error']); } } } } ! else if ( $mode == 'editpost' ) { remove_search_post($post_id); } ! if ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['first_post'] ) ) { ! $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"; ! if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); } ! if ( $mode == 'newtopic' ) { $topic_id = $db->sql_nextid(); } } ! $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"; ! if ( !$db->sql_query($sql, BEGIN_TRANSACTION) ) { message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); } ! if ( $mode != 'editpost' ) { $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"; ! if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); } ! add_search_words($post_id, stripslashes($post_message), stripslashes($post_subject)); // // Add poll // ! 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"; ! if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); } $delete_option_sql = ''; $old_poll_result = array(); ! if ( $mode == 'editpost' && $post_data['has_poll'] ) { $sql = "SELECT vote_option_id, vote_result FROM " . VOTE_RESULTS_TABLE . " WHERE vote_id = $poll_id ORDER BY vote_option_id ASC"; ! if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not obtain vote data results for this topic', '', __LINE__, __FILE__, $sql); } ! while ( $row = $db->sql_fetchrow($result) ) { $old_poll_result[$row['vote_option_id']] = $row['vote_result']; ! if ( !isset($poll_options[$row['vote_option_id']]) ) { ! $delete_option_sql .= ( $delete_option_sql != '' ) ? ', ' . $row['vote_option_id'] : $row['vote_option_id']; } } } --- 222,320 ---- $current_time = time(); ! if ($mode == 'newtopic' || $mode == 'reply' || $mode == 'editpost') { // // Flood control // ! $where_sql = ($userdata['user_id'] == ANONYMOUS) ? "poster_ip = '$user_ip'" : 'poster_id = ' . $userdata['user_id']; $sql = "SELECT MAX(post_time) AS last_post_time FROM " . POSTS_TABLE . " WHERE $where_sql"; ! if ($result = $db->sql_query($sql)) { ! if ($row = $db->sql_fetchrow($result)) { ! if (intval($row['last_post_time']) > 0 && ($current_time - intval($row['last_post_time'])) < intval($board_config['flood_interval'])) { message_die(GENERAL_MESSAGE, $lang['Flood_Error']); } } } } ! ! if ($mode == 'editpost') { remove_search_post($post_id); } ! if ($mode == 'newtopic' || ($mode == 'editpost' && $post_data['first_post'])) { ! $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 " . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . " WHERE topic_id = $topic_id"; ! if (!$db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); } ! if ($mode == 'newtopic') { $topic_id = $db->sql_nextid(); } } ! $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 post_username = '$post_username', enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig" . $edited_sql . " WHERE post_id = $post_id"; ! if (!$db->sql_query($sql, BEGIN_TRANSACTION)) { message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); } ! if ($mode != 'editpost') { $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"; ! if (!$db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); } ! add_search_words('single', $post_id, stripslashes($post_message), stripslashes($post_subject)); // // Add poll // ! if (($mode == 'newtopic' || ($mode == 'editpost' && $post_data['edit_poll'])) && !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"; ! if (!$db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); } $delete_option_sql = ''; $old_poll_result = array(); ! if ($mode == 'editpost' && $post_data['has_poll']) { $sql = "SELECT vote_option_id, vote_result FROM " . VOTE_RESULTS_TABLE . " WHERE vote_id = $poll_id ORDER BY vote_option_id ASC"; ! if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, 'Could not obtain vote data results for this topic', '', __LINE__, __FILE__, $sql); } ! while ($row = $db->sql_fetchrow($result)) { $old_poll_result[$row['vote_option_id']] = $row['vote_result']; ! if (!isset($poll_options[$row['vote_option_id']])) { ! $delete_option_sql .= ($delete_option_sql != '') ? ', ' . $row['vote_option_id'] : $row['vote_option_id']; } } } *************** *** 322,336 **** @reset($poll_options); $poll_option_id = 1; ! while ( list($option_id, $option_text) = each($poll_options) ) { ! if ( !empty($option_text) ) { ! $option_text = str_replace("\'", "''", $option_text); ! $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"; ! if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); } --- 326,340 ---- @reset($poll_options); $poll_option_id = 1; ! while (list($option_id, $option_text) = each($poll_options)) { ! if (!empty($option_text)) { ! $option_text = str_replace("\'", "''", htmlspecialchars($option_text)); ! $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"; ! if (!$db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); } *************** *** 338,349 **** } } ! if ( $delete_option_sql != '' ) { $sql = "DELETE FROM " . VOTE_RESULTS_TABLE . " WHERE vote_option_id IN ($delete_option_sql) AND vote_id = $poll_id"; ! if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Error deleting pruned poll options', '', __LINE__, __FILE__, $sql); } --- 342,353 ---- } } ! if ($delete_option_sql != '') { $sql = "DELETE FROM " . VOTE_RESULTS_TABLE . " WHERE vote_option_id IN ($delete_option_sql) AND vote_id = $poll_id"; ! if (!$db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Error deleting pruned poll options', '', __LINE__, __FILE__, $sql); } *************** *** 363,377 **** { global $db; ! $sign = ( $mode == 'delete' ) ? '- 1' : '+ 1'; $forum_update_sql = "forum_posts = forum_posts $sign"; $topic_update_sql = ''; ! if ( $mode == 'delete' ) { ! if ( $post_data['last_post'] ) { ! if ( $post_data['first_post'] ) { $forum_update_sql .= ', forum_topics = forum_topics - 1'; } --- 367,381 ---- { global $db; ! $sign = ($mode == 'delete') ? '- 1' : '+ 1'; $forum_update_sql = "forum_posts = forum_posts $sign"; $topic_update_sql = ''; ! if ($mode == 'delete') { ! if ($post_data['last_post']) { ! if ($post_data['first_post']) { $forum_update_sql .= ', forum_topics = forum_topics - 1'; } *************** *** 383,426 **** $sql = "SELECT MAX(post_id) AS last_post_id FROM " . POSTS_TABLE . " WHERE topic_id = $topic_id"; ! if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); } ! if ( $row = $db->sql_fetchrow($result) ) { $topic_update_sql .= ', topic_last_post_id = ' . $row['last_post_id']; } } ! if ( $post_data['last_topic'] ) { $sql = "SELECT MAX(post_id) AS last_post_id FROM " . POSTS_TABLE . " WHERE forum_id = $forum_id"; ! if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); } ! if ( $row = $db->sql_fetchrow($result) ) { ! $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'] ) { $sql = "SELECT MIN(post_id) AS first_post_id FROM " . POSTS_TABLE . " WHERE topic_id = $topic_id"; ! if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); } ! if ( $row = $db->sql_fetchrow($result) ) { $topic_update_sql .= 'topic_replies = topic_replies - 1, topic_first_post_id = ' . $row['first_post_id']; } --- 387,430 ---- $sql = "SELECT MAX(post_id) AS last_post_id FROM " . POSTS_TABLE . " WHERE topic_id = $topic_id"; ! if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); } ! if ($row = $db->sql_fetchrow($result)) { $topic_update_sql .= ', topic_last_post_id = ' . $row['last_post_id']; } } ! if ($post_data['last_topic']) { $sql = "SELECT MAX(post_id) AS last_post_id FROM " . POSTS_TABLE . " WHERE forum_id = $forum_id"; ! if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); } ! if ($row = $db->sql_fetchrow($result)) { ! $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']) { $sql = "SELECT MIN(post_id) AS first_post_id FROM " . POSTS_TABLE . " WHERE topic_id = $topic_id"; ! if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); } ! if ($row = $db->sql_fetchrow($result)) { $topic_update_sql .= 'topic_replies = topic_replies - 1, topic_first_post_id = ' . $row['first_post_id']; } *************** *** 430,439 **** $topic_update_sql .= 'topic_replies = topic_replies - 1'; } } ! else if ( $mode != 'poll_delete' ) { ! $forum_update_sql .= ", forum_last_post_id = $post_id" . ( ( $mode == 'newtopic' ) ? ", forum_topics = forum_topics $sign" : "" ); ! $topic_update_sql = "topic_last_post_id = $post_id" . ( ( $mode == 'reply' ) ? ", topic_replies = topic_replies $sign" : ", topic_first_post_id = $post_id" ); } else { --- 434,443 ---- $topic_update_sql .= 'topic_replies = topic_replies - 1'; } } ! else if ($mode != 'poll_delete') { ! $forum_update_sql .= ", forum_last_post_id = $post_id" . (($mode == 'newtopic') ? ", forum_topics = forum_topics $sign" : ""); ! $topic_update_sql = "topic_last_post_id = $post_id" . (($mode == 'reply') ? ", topic_replies = topic_replies $sign" : ", topic_first_post_id = $post_id"); } else { *************** *** 443,471 **** $sql = "UPDATE " . FORUMS_TABLE . " SET $forum_update_sql WHERE forum_id = $forum_id"; ! if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); } ! if ( $topic_update_sql != '' ) { $sql = "UPDATE " . TOPICS_TABLE . " SET $topic_update_sql ! WHERE topic_id = $topic_id ! OR topic_moved_id = $topic_id"; ! if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); } } ! if ( $mode != 'poll_delete' ) { $sql = "UPDATE " . USERS_TABLE . " SET user_posts = user_posts $sign WHERE user_id = $user_id"; ! if ( !$db->sql_query($sql, END_TRANSACTION) ) { message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); } --- 447,474 ---- $sql = "UPDATE " . FORUMS_TABLE . " SET $forum_update_sql WHERE forum_id = $forum_id"; ! if (!$db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); } ! if ($topic_update_sql != '') { $sql = "UPDATE " . TOPICS_TABLE . " SET $topic_update_sql ! WHERE topic_id = $topic_id"; ! if (!$db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); } } ! if ($mode != 'poll_delete') { $sql = "UPDATE " . USERS_TABLE . " SET user_posts = user_posts $sign WHERE user_id = $user_id"; ! if (!$db->sql_query($sql, END_TRANSACTION)) { message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); } *************** *** 482,521 **** global $board_config, $lang, $db, $phpbb_root_path, $phpEx; global $userdata, $user_ip; include($phpbb_root_path . 'includes/functions_search.'.$phpEx); - if ( $mode != 'poll_delete' ) - { $sql = "DELETE FROM " . POSTS_TABLE . " WHERE post_id = $post_id"; ! if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); } $sql = "DELETE FROM " . POSTS_TEXT_TABLE . " WHERE post_id = $post_id"; ! if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); } ! if ( $post_data['last_post'] ) { ! if ( $post_data['first_post'] ) { $forum_update_sql .= ', forum_topics = forum_topics - 1'; $sql = "DELETE FROM " . TOPICS_TABLE . " WHERE topic_id = $topic_id OR topic_moved_id = $topic_id"; ! if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); } $sql = "DELETE FROM " . TOPICS_WATCH_TABLE . " WHERE topic_id = $topic_id"; ! if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); } --- 485,524 ---- global $board_config, $lang, $db, $phpbb_root_path, $phpEx; global $userdata, $user_ip; + if ($mode != 'poll_delete') + { include($phpbb_root_path . 'includes/functions_search.'.$phpEx); $sql = "DELETE FROM " . POSTS_TABLE . " WHERE post_id = $post_id"; ! if (!$db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); } $sql = "DELETE FROM " . POSTS_TEXT_TABLE . " WHERE post_id = $post_id"; ! if (!$db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); } ! if ($post_data['last_post']) { ! if ($post_data['first_post']) { $forum_update_sql .= ', forum_topics = forum_topics - 1'; $sql = "DELETE FROM " . TOPICS_TABLE . " WHERE topic_id = $topic_id OR topic_moved_id = $topic_id"; ! if (!$db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); } $sql = "DELETE FROM " . TOPICS_WATCH_TABLE . " WHERE topic_id = $topic_id"; ! if (!$db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); } *************** *** 525,555 **** 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'] ) { $sql = "DELETE FROM " . VOTE_DESC_TABLE . " WHERE topic_id = $topic_id"; ! if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql); } $sql = "DELETE FROM " . VOTE_RESULTS_TABLE . " WHERE vote_id = $poll_id"; ! if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql); } $sql = "DELETE FROM " . VOTE_USERS_TABLE . " WHERE vote_id = $poll_id"; ! if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql); } } ! if ( $mode == 'delete' && $post_data['first_post'] && $post_data['last_post'] ) { $meta = ''; $message = $lang['Deleted']; --- 528,558 ---- 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']) { $sql = "DELETE FROM " . VOTE_DESC_TABLE . " WHERE topic_id = $topic_id"; ! if (!$db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql); } $sql = "DELETE FROM " . VOTE_RESULTS_TABLE . " WHERE vote_id = $poll_id"; ! if (!$db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql); } $sql = "DELETE FROM " . VOTE_USERS_TABLE . " WHERE vote_id = $poll_id"; ! if (!$db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql); } } ! if ($mode == 'delete' && $post_data['first_post'] && $post_data['last_post']) { $meta = ''; $message = $lang['Deleted']; *************** *** 557,563 **** else { $meta = ''; ! $message = ( ( $mode == 'poll_delete' ) ? $lang['Poll_delete'] : $lang['Deleted'] ) . '

' . sprintf($lang['Click_return_topic'], '', ''); } $message .= '

' . sprintf($lang['Click_return_forum'], '', ''); --- 560,566 ---- else { $meta = ''; ! $message = (($mode == 'poll_delete') ? $lang['Poll_delete'] : $lang['Deleted']) . '

' . sprintf($lang['Click_return_topic'], '', ''); } $message .= '

' . sprintf($lang['Click_return_forum'], '', ''); *************** *** 568,655 **** // // Handle user notification on new post // ! function user_notification($mode, &$post_data, &$forum_id, &$topic_id, &$post_id, &$notify_user) { global $board_config, $lang, $db, $phpbb_root_path, $phpEx; global $userdata, $user_ip; $current_time = time(); ! if ( $mode == 'delete' ) { ! $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; ! if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not change topic notify data', '', __LINE__, __FILE__, $sql); } } else { ! if ( $mode == 'reply' ) { $sql = "SELECT ban_userid FROM " . BANLIST_TABLE; ! if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not obtain banlist', '', __LINE__, __FILE__, $sql); } $user_id_sql = ''; ! while ( $row = $db->sql_fetchrow($result) ) { ! if ( isset($row['ban_userid']) ) { ! $user_id_sql = ', ' . $row['ban_userid']; } } ! $sql = "SELECT u.user_id, u.username, u.user_email, u.user_lang, t.topic_title ! FROM " . TOPICS_WATCH_TABLE . " tw, " . TOPICS_TABLE . " t, " . USERS_TABLE . " u WHERE tw.topic_id = $topic_id ! AND tw.user_id NOT IN (" . $userdata['user_id'] . ", " . ANONYMOUS . $user_id_sql . " ) AND tw.notify_status = " . TOPIC_WATCH_UN_NOTIFIED . " - AND t.topic_id = tw.topic_id AND u.user_id = tw.user_id"; ! if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not obtain list of topic watchers', '', __LINE__, __FILE__, $sql); } ! $orig_word = array(); ! $replacement_word = array(); ! obtain_word_list($orig_word, $replacement_word); include($phpbb_root_path . 'includes/emailer.'.$phpEx); $emailer = new emailer($board_config['smtp_delivery']); $script_name = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['script_path'])); ! $script_name = ( $script_name != '' ) ? $script_name . '/viewtopic.'.$phpEx : 'viewtopic.'.$phpEx; $server_name = trim($board_config['server_name']); ! $server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://'; ! $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'] . "\n"; ! $update_watched_sql = ''; ! if ( $row = $db->sql_fetchrow($result) ) ! { ! @set_time_limit(120); ! $topic_title = preg_replace($orig_word, $replacement_word, unprepare_message($row['topic_title'])); ! do { ! if ( $row['user_email'] != '' ) { ! $emailer->use_template('topic_notify', $row['user_lang']); ! $emailer->email_address($row['user_email']); ! $emailer->set_subject(); ! $emailer->extra_headers($email_headers); $emailer->assign_vars(array( ! 'EMAIL_SIG' => str_replace('
', "\n", "-- \n" . $board_config['board_email_sig']), ! 'USERNAME' => $row['username'], 'SITENAME' => $board_config['sitename'], 'TOPIC_TITLE' => $topic_title, --- 571,696 ---- // // Handle user notification on new post // ! function user_notification($mode, &$post_data, &$topic_title, &$forum_id, &$topic_id, &$post_id, &$notify_user) { global $board_config, $lang, $db, $phpbb_root_path, $phpEx; global $userdata, $user_ip; $current_time = time(); ! if ($mode == 'delete') { ! $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; ! if (!$db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not change topic notify data', '', __LINE__, __FILE__, $sql); } } else { ! if ($mode == 'reply') { $sql = "SELECT ban_userid FROM " . BANLIST_TABLE; ! if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, 'Could not obtain banlist', '', __LINE__, __FILE__, $sql); } $user_id_sql = ''; ! while ($row = $db->sql_fetchrow($result)) { ! if (isset($row['ban_userid']) && !empty($row['ban_userid'])) { ! $user_id_sql .= ', ' . $row['ban_userid']; } } ! $sql = "SELECT u.user_id, u.user_email, u.user_lang ! FROM " . TOPICS_WATCH_TABLE . " tw, " . USERS_TABLE . " u WHERE tw.topic_id = $topic_id ! AND tw.user_id NOT IN (" . $userdata['user_id'] . ", " . ANONYMOUS . $user_id_sql . ") AND tw.notify_status = " . TOPIC_WATCH_UN_NOTIFIED . " AND u.user_id = tw.user_id"; ! if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, 'Could not obtain list of topic watchers', '', __LINE__, __FILE__, $sql); } ! $update_watched_sql = ''; ! $bcc_list_ary = array(); ! ! if ($row = $db->sql_fetchrow($result)) ! { ! // Sixty second limit ! @set_time_limit(60); ! ! do ! { ! if ($row['user_email'] != '') ! { ! $bcc_list_ary[$row['user_lang']][] = $row['user_email']; ! } ! $update_watched_sql .= ($update_watched_sql != '') ? ', ' . $row['user_id'] : $row['user_id']; ! } ! while ($row = $db->sql_fetchrow($result)); ! ! // ! // Let's do some checking to make sure that mass mail functions ! // are working in win32 versions of php. ! // ! if (preg_match('/[c-z]:\\\.*/i', getenv('PATH')) && !$board_config['smtp_delivery']) ! { ! $ini_val = (@phpversion() >= '4.0.0') ? 'ini_get' : 'get_cfg_var'; ! ! // 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_host'] = @$ini_val('SMTP'); ! } + if (sizeof($bcc_list_ary)) + { include($phpbb_root_path . 'includes/emailer.'.$phpEx); $emailer = new emailer($board_config['smtp_delivery']); $script_name = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['script_path'])); ! $script_name = ($script_name != '') ? $script_name . '/viewtopic.'.$phpEx : 'viewtopic.'.$phpEx; $server_name = trim($board_config['server_name']); ! $server_protocol = ($board_config['cookie_secure']) ? 'https://' : 'http://'; ! $server_port = ($board_config['server_port'] <> 80) ? ':' . trim($board_config['server_port']) . '/' : '/'; ! $orig_word = array(); ! $replacement_word = array(); ! obtain_word_list($orig_word, $replacement_word); ! $emailer->from($board_config['board_email']); ! $emailer->replyto($board_config['board_email']); ! $topic_title = (count($orig_word)) ? preg_replace($orig_word, $replacement_word, unprepare_message($topic_title)) : unprepare_message($topic_title); ! @reset($bcc_list_ary); ! while (list($user_lang, $bcc_list) = each($bcc_list_ary)) { ! $emailer->use_template('topic_notify', $user_lang); ! ! for ($i = 0; $i < count($bcc_list); $i++) { ! $emailer->bcc($bcc_list[$i]); ! } ! ! // The Topic_reply_notification lang string below will be used ! // if for some reason the mail template subject cannot be read ! // ... note it will not necessarily be in the posters own language! ! $emailer->set_subject($lang['Topic_reply_notification']); ! ! // This is a nasty kludge to remove the username var ... till (if?) ! // translators update their templates ! $emailer->msg = preg_replace('#[ ]?{USERNAME}#', '', $emailer->msg); $emailer->assign_vars(array( ! 'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('
', "\n", "-- \n" . $board_config['board_email_sig']) : '', 'SITENAME' => $board_config['sitename'], 'TOPIC_TITLE' => $topic_title, *************** *** 659,672 **** $emailer->send(); $emailer->reset(); - - $update_watched_sql .= ( $update_watched_sql != '' ) ? ', ' . $row['user_id'] : $row['user_id']; } } - while ( $row = $db->sql_fetchrow($result) ); } ! if ( $update_watched_sql != '' ) { $sql = "UPDATE " . TOPICS_WATCH_TABLE . " SET notify_status = " . TOPIC_WATCH_NOTIFIED . " --- 700,711 ---- $emailer->send(); $emailer->reset(); } } } + $db->sql_freeresult($result); ! if ($update_watched_sql != '') { $sql = "UPDATE " . TOPICS_WATCH_TABLE . " SET notify_status = " . TOPIC_WATCH_NOTIFIED . " *************** *** 680,707 **** FROM " . TOPICS_WATCH_TABLE . " WHERE topic_id = $topic_id AND user_id = " . $userdata['user_id']; ! if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not obtain topic watch information', '', __LINE__, __FILE__, $sql); } $row = $db->sql_fetchrow($result); ! if ( !$notify_user && !empty($row['topic_id']) ) { $sql = "DELETE FROM " . TOPICS_WATCH_TABLE . " WHERE topic_id = $topic_id AND user_id = " . $userdata['user_id']; ! if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not delete topic watch information', '', __LINE__, __FILE__, $sql); } } ! else if ( $notify_user && empty($row['topic_id']) ) { $sql = "INSERT INTO " . TOPICS_WATCH_TABLE . " (user_id, topic_id, notify_status) VALUES (" . $userdata['user_id'] . ", $topic_id, 0)"; ! if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not insert topic watch information', '', __LINE__, __FILE__, $sql); } --- 719,746 ---- FROM " . TOPICS_WATCH_TABLE . " WHERE topic_id = $topic_id AND user_id = " . $userdata['user_id']; ! if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, 'Could not obtain topic watch information', '', __LINE__, __FILE__, $sql); } $row = $db->sql_fetchrow($result); ! if (!$notify_user && !empty($row['topic_id'])) { $sql = "DELETE FROM " . TOPICS_WATCH_TABLE . " WHERE topic_id = $topic_id AND user_id = " . $userdata['user_id']; ! if (!$db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not delete topic watch information', '', __LINE__, __FILE__, $sql); } } ! else if ($notify_user && empty($row['topic_id'])) { $sql = "INSERT INTO " . TOPICS_WATCH_TABLE . " (user_id, topic_id, notify_status) VALUES (" . $userdata['user_id'] . ", $topic_id, 0)"; ! if (!$db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not insert topic watch information', '', __LINE__, __FILE__, $sql); } *************** *** 723,729 **** $inline_rows = 5; $window_columns = 8; ! if ( $mode == 'window' ) { $userdata = session_pagestart($user_ip, $page_id); init_userprefs($userdata); --- 762,768 ---- $inline_rows = 5; $window_columns = 8; ! if ($mode == 'window') { $userdata = session_pagestart($user_ip, $page_id); init_userprefs($userdata); *************** *** 741,772 **** $sql = "SELECT emoticon, code, smile_url FROM " . SMILIES_TABLE . " ORDER BY smilies_id"; ! if ( $result = $db->sql_query($sql) ) { $num_smilies = 0; $rowset = array(); ! while ( $row = $db->sql_fetchrow($result) ) { ! if ( empty($rowset[$row['smile_url']]) ) { ! $rowset[$row['smile_url']]['code'] = str_replace('\\', '\\\\', str_replace("'", "\\'", $row['code'])); $rowset[$row['smile_url']]['emoticon'] = $row['emoticon']; $num_smilies++; } } ! if ( $num_smilies ) { ! $smilies_count = ( $mode == 'inline' ) ? min(19, $num_smilies) : $num_smilies; ! $smilies_split_row = ( $mode == 'inline' ) ? $inline_columns - 1 : $window_columns - 1; $s_colspan = 0; $row = 0; $col = 0; ! while ( list($smile_url, $data) = @each($rowset) ) { ! if ( !$col ) { $template->assign_block_vars('smilies_row', array()); } --- 780,811 ---- $sql = "SELECT emoticon, code, smile_url FROM " . SMILIES_TABLE . " ORDER BY smilies_id"; ! if ($result = $db->sql_query($sql)) { $num_smilies = 0; $rowset = array(); ! while ($row = $db->sql_fetchrow($result)) { ! if (empty($rowset[$row['smile_url']])) { ! $rowset[$row['smile_url']]['code'] = str_replace("'", "\\'", str_replace('\\', '\\\\', $row['code'])); $rowset[$row['smile_url']]['emoticon'] = $row['emoticon']; $num_smilies++; } } ! if ($num_smilies) { ! $smilies_count = ($mode == 'inline') ? min(19, $num_smilies) : $num_smilies; ! $smilies_split_row = ($mode == 'inline') ? $inline_columns - 1 : $window_columns - 1; $s_colspan = 0; $row = 0; $col = 0; ! while (list($smile_url, $data) = @each($rowset)) { ! if (!$col) { $template->assign_block_vars('smilies_row', array()); } *************** *** 779,787 **** $s_colspan = max($s_colspan, $col + 1); ! if ( $col == $smilies_split_row ) { ! if ( $mode == 'inline' && $row == $inline_rows - 1 ) { break; } --- 818,826 ---- $s_colspan = max($s_colspan, $col + 1); ! if ($col == $smilies_split_row) { ! if ($mode == 'inline' && $row == $inline_rows - 1) { break; } *************** *** 794,800 **** } } ! if ( $mode == 'inline' && $num_smilies > $inline_rows * $inline_columns ) { $template->assign_block_vars('switch_smilies_extra', array()); --- 833,839 ---- } } ! if ($mode == 'inline' && $num_smilies > $inline_rows * $inline_columns) { $template->assign_block_vars('switch_smilies_extra', array()); *************** *** 812,818 **** } } ! if ( $mode == 'window' ) { $template->pparse('smiliesbody'); --- 851,857 ---- } } ! if ($mode == 'window') { $template->pparse('smiliesbody'); diff -crbB phpbb203/includes/functions_search.php phpbb206/includes/functions_search.php *** phpbb203/includes/functions_search.php Sun Jun 15 14:32:15 2003 --- phpbb206/includes/functions_search.php Wed Sep 10 18:37:50 2003 *************** *** 3,12 **** * functions_search.php * ------------------- * begin : Wed Sep 05 2001 ! * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: functions_search.php,v 1.8.2.5 2002/05/13 13:27:12 psotfx Exp $ * ****************************************************************************/ --- 3,12 ---- * functions_search.php * ------------------- * begin : Wed Sep 05 2001 ! * copyright : (C) 2002 The phpBB Group * email : support@phpbb.com * ! * $Id: functions_search.php,v 1.8.2.17 2003/08/23 01:16:13 psotfx Exp $ * ****************************************************************************/ *************** *** 58,64 **** $entry = str_replace('*', ' ', $entry); // 'words' that consist of <3 or >20 characters are removed. ! $entry = preg_replace('/\b([a-z0-9]{1,2}|[a-z0-9]{21,})\b/',' ', $entry); } if ( !empty($stopword_list) ) --- 58,64 ---- $entry = str_replace('*', ' ', $entry); // 'words' that consist of <3 or >20 characters are removed. ! $entry = preg_replace('/[ ]([\S]{1,2}|[\S]{21,})[ ]/',' ', $entry); } if ( !empty($stopword_list) ) *************** *** 69,75 **** if ( $mode == 'post' || ( $stopword != 'not' && $stopword != 'and' && $stopword != 'or' ) ) { ! $entry = preg_replace('#\b' . preg_quote($stopword) . '\b#', ' ', $entry); } } } --- 69,75 ---- if ( $mode == 'post' || ( $stopword != 'not' && $stopword != 'and' && $stopword != 'or' ) ) { ! $entry = str_replace(' ' . trim($stopword) . ' ', ' ', $entry); } } } *************** *** 81,87 **** list($replace_synonym, $match_synonym) = split(' ', trim(strtolower($synonym_list[$j]))); if ( $mode == 'post' || ( $match_synonym != 'not' && $match_synonym != 'and' && $match_synonym != 'or' ) ) { ! $entry = preg_replace('#\b' . trim($match_synonym) . '\b#', ' ' . trim($replace_synonym) . ' ', $entry); } } } --- 81,87 ---- list($replace_synonym, $match_synonym) = split(' ', trim(strtolower($synonym_list[$j]))); if ( $mode == 'post' || ( $match_synonym != 'not' && $match_synonym != 'and' && $match_synonym != 'or' ) ) { ! $entry = str_replace(' ' . trim($match_synonym) . ' ', ' ' . trim($replace_synonym) . ' ', $entry); } } } *************** *** 91,113 **** function split_words(&$entry, $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); return $split_entries[1]; } ! function add_search_words($post_id, $post_text, $post_title = '') { global $db, $phpbb_root_path, $board_config, $lang; ! $stopwords_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . "/search_stopwords.txt"); $synonym_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . "/search_synonyms.txt"); $search_raw_words = array(); $search_raw_words['text'] = split_words(clean_words('post', $post_text, $stopword_array, $synonym_array)); $search_raw_words['title'] = split_words(clean_words('post', $post_title, $stopword_array, $synonym_array)); $word = array(); $word_insert_sql = array(); while ( list($word_in, $search_matches) = @each($search_raw_words) ) --- 91,120 ---- function split_words(&$entry, $mode = 'post') { ! // If you experience problems with the new method, uncomment this block. ! /* ! $rex = ( $mode == 'post' ) ? "/\b([\w±µ-ÿ][\w±µ-ÿ']*[\w±µ-ÿ]+|[\w±µ-ÿ]+?)\b/" : '/(\*?[a-z0-9±µ-ÿ]+\*?)|\b([a-z0-9±µ-ÿ]+)\b/'; preg_match_all($rex, $entry, $split_entries); return $split_entries[1]; + */ + // Trim 1+ spaces to one space and split this trimmed string into words. + return explode(' ', trim(preg_replace('#\s+#', ' ', $entry))); } ! function add_search_words($mode, $post_id, $post_text, $post_title = '') { global $db, $phpbb_root_path, $board_config, $lang; ! $stopword_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . "/search_stopwords.txt"); $synonym_array = @file($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . "/search_synonyms.txt"); $search_raw_words = array(); $search_raw_words['text'] = split_words(clean_words('post', $post_text, $stopword_array, $synonym_array)); $search_raw_words['title'] = split_words(clean_words('post', $post_title, $stopword_array, $synonym_array)); + @set_time_limit(0); + $word = array(); $word_insert_sql = array(); while ( list($word_in, $search_matches) = @each($search_raw_words) ) *************** *** 244,252 **** } } ! if ( $mode == 'single' ) { ! remove_common('single', 0.4, $word); } return; --- 251,259 ---- } } ! if ($mode == 'single') { ! remove_common('single', 4/10, $word); } return; *************** *** 259,265 **** { global $db; ! $sql = ( $mode == 'global' ) ? "SELECT COUNT(post_id) AS total_posts FROM " . SEARCH_MATCH_TABLE . " GROUP BY post_id" : "SELECT SUM(forum_posts) AS total_posts FROM " . FORUMS_TABLE; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not obtain post count', '', __LINE__, __FILE__, $sql); --- 266,273 ---- { global $db; ! $sql = "SELECT COUNT(post_id) AS total_posts ! FROM " . POSTS_TABLE; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not obtain post count', '', __LINE__, __FILE__, $sql); *************** *** 325,331 **** } } ! return $word_count; } function remove_search_post($post_id_sql) --- 333,339 ---- } } ! return; } function remove_search_post($post_id_sql) *************** *** 429,435 **** $sql = "SELECT username FROM " . USERS_TABLE . " ! WHERE username LIKE '" . str_replace("\'", "''", $username_search) . "' ORDER BY username"; if ( !($result = $db->sql_query($sql)) ) { --- 437,443 ---- $sql = "SELECT username FROM " . USERS_TABLE . " ! WHERE username LIKE '" . str_replace("\'", "''", $username_search) . "' AND user_id <> " . ANONYMOUS . " ORDER BY username"; if ( !($result = $db->sql_query($sql)) ) { *************** *** 459,465 **** ); $template->assign_vars(array( ! 'USERNAME' => ( !empty($search_match) ) ? $search_match : '', 'L_CLOSE_WINDOW' => $lang['Close_window'], 'L_SEARCH_USERNAME' => $lang['Find_username'], --- 467,473 ---- ); $template->assign_vars(array( ! 'USERNAME' => ( !empty($search_match) ) ? strip_tags($search_match) : '', 'L_CLOSE_WINDOW' => $lang['Close_window'], 'L_SEARCH_USERNAME' => $lang['Find_username'], diff -crbB phpbb203/includes/functions_selects.php phpbb206/includes/functions_selects.php *** phpbb203/includes/functions_selects.php Sun Jun 15 14:32:15 2003 --- phpbb206/includes/functions_selects.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: functions_selects.php,v 1.3 2002/03/18 23:53:12 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: functions_selects.php,v 1.3.2.4 2002/12/22 12:20:35 psotfx Exp $ * * ***************************************************************************/ *************** *** 26,39 **** // function language_select($default, $select_name = "language", $dirname="language") { ! global $phpEx; ! $dir = opendir($dirname); $lang = array(); while ( $file = readdir($dir) ) { ! if ( ereg("^lang_", $file) && !is_file($dirname . "/" . $file) && !is_link($dirname . "/" . $file) ) { $filename = trim(str_replace("lang_", "", $file)); $displayname = preg_replace("/^(.*?)_(.*)$/", "\\1 [ \\2 ]", $filename); --- 26,39 ---- // function language_select($default, $select_name = "language", $dirname="language") { ! global $phpEx, $phpbb_root_path; ! $dir = opendir($phpbb_root_path . $dirname); $lang = array(); while ( $file = readdir($dir) ) { ! if (preg_match('#^lang_#i', $file) && !is_file(@phpbb_realpath($phpbb_root_path . $dirname . '/' . $file)) && !is_link(@phpbb_realpath($phpbb_root_path . $dirname . '/' . $file))) { $filename = trim(str_replace("lang_", "", $file)); $displayname = preg_replace("/^(.*?)_(.*)$/", "\\1 [ \\2 ]", $filename); diff -crbB phpbb203/includes/functions_validate.php phpbb206/includes/functions_validate.php *** phpbb203/includes/functions_validate.php Sun Jun 15 14:32:15 2003 --- phpbb206/includes/functions_validate.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: functions_validate.php,v 1.6.2.2 2002/07/19 15:22:36 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: functions_validate.php,v 1.6.2.12 2003/06/09 19:13:05 psotfx Exp $ * * ***************************************************************************/ *************** *** 18,24 **** * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * - * ***************************************************************************/ // --- 18,23 ---- *************** *** 30,90 **** { global $db, $lang, $userdata; ! $username = str_replace("\'", "''", $username); $sql = "SELECT username FROM " . USERS_TABLE . " WHERE LOWER(username) = '" . strtolower($username) . "'"; ! if ( $result = $db->sql_query($sql) ) { ! if ( $row = $db->sql_fetchrow($result) ) { ! if ( ( $userdata['session_logged_in'] && $row['username'] != $userdata['username'] ) || !$userdata['session_logged_in'] ) { return array('error' => true, 'error_msg' => $lang['Username_taken']); } } } $sql = "SELECT group_name FROM " . GROUPS_TABLE . " WHERE LOWER(group_name) = '" . strtolower($username) . "'"; ! if ( $result = $db->sql_query($sql) ) { ! if ( $row = $db->sql_fetchrow($result) ) { return array('error' => true, 'error_msg' => $lang['Username_taken']); } } $sql = "SELECT disallow_username FROM " . DISALLOW_TABLE; ! if ( $result = $db->sql_query($sql) ) { ! while( $row = $db->sql_fetchrow($result) ) { ! if ( preg_match("#\b(" . str_replace("\*", ".*?", phpbb_preg_quote($row['disallow_username'], '#')) . ")\b#i", $username) ) { return array('error' => true, 'error_msg' => $lang['Username_disallowed']); } } } $sql = "SELECT word FROM " . WORDS_TABLE; ! if ( $result = $db->sql_query($sql) ) { ! while( $row = $db->sql_fetchrow($result) ) { ! if ( preg_match("#\b(" . str_replace("\*", ".*?", phpbb_preg_quote($row['word'], '#')) . ")\b#i", $username) ) { return array('error' => true, 'error_msg' => $lang['Username_disallowed']); } } } ! // Don't allow " in username. ! if ( strstr($username, '"') ) { return array('error' => true, 'error_msg' => $lang['Username_invalid']); } --- 29,109 ---- { global $db, $lang, $userdata; ! // Remove doubled up spaces ! $username = preg_replace('#\s+#', ' ', $username); ! // Limit username length ! $username = substr(str_replace("\'", "'", $username), 0, 25); ! $username = str_replace("'", "''", $username); $sql = "SELECT username FROM " . USERS_TABLE . " WHERE LOWER(username) = '" . strtolower($username) . "'"; ! if ($result = $db->sql_query($sql)) { ! if ($row = $db->sql_fetchrow($result)) { ! if (($userdata['session_logged_in'] && $row['username'] != $userdata['username']) || !$userdata['session_logged_in']) { + $db->sql_freeresult($result); return array('error' => true, 'error_msg' => $lang['Username_taken']); } } } + $db->sql_freeresult($result); $sql = "SELECT group_name FROM " . GROUPS_TABLE . " WHERE LOWER(group_name) = '" . strtolower($username) . "'"; ! if ($result = $db->sql_query($sql)) { ! if ($row = $db->sql_fetchrow($result)) { + $db->sql_freeresult($result); return array('error' => true, 'error_msg' => $lang['Username_taken']); } } + $db->sql_freeresult($result); $sql = "SELECT disallow_username FROM " . DISALLOW_TABLE; ! if ($result = $db->sql_query($sql)) ! { ! if ($row = $db->sql_fetchrow($result)) { ! do { ! if (preg_match("#\b(" . str_replace("\*", ".*?", phpbb_preg_quote($row['disallow_username'], '#')) . ")\b#i", $username)) { + $db->sql_freeresult($result); return array('error' => true, 'error_msg' => $lang['Username_disallowed']); } } + while($row = $db->sql_fetchrow($result)); } + } + $db->sql_freeresult($result); $sql = "SELECT word FROM " . WORDS_TABLE; ! if ($result = $db->sql_query($sql)) ! { ! if ($row = $db->sql_fetchrow($result)) { ! do { ! if (preg_match("#\b(" . str_replace("\*", ".*?", phpbb_preg_quote($row['word'], '#')) . ")\b#i", $username)) { + $db->sql_freeresult($result); return array('error' => true, 'error_msg' => $lang['Username_disallowed']); } } + while ($row = $db->sql_fetchrow($result)); } + } + $db->sql_freeresult($result); ! // Don't allow " and ALT-255 in username. ! if (strstr($username, '"') || strstr($username, '"') || strstr($username, chr(160))) { return array('error' => true, 'error_msg' => $lang['Username_invalid']); } *************** *** 100,135 **** { global $db, $lang; ! if ( $email != '' ) { ! if ( preg_match('/^[a-z0-9\.\-_\+]+@[a-z0-9\-_]+\.([a-z0-9\-_]+\.)*?[a-z]+$/is', $email) ) { $sql = "SELECT ban_email FROM " . BANLIST_TABLE; ! if ( $result = $db->sql_query($sql) ) { ! while( $row = $db->sql_fetchrow($result) ) { $match_email = str_replace('*', '.*?', $row['ban_email']); ! if ( preg_match('/^' . $match_email . '$/is', $email) ) { return array('error' => true, 'error_msg' => $lang['Email_banned']); } } } $sql = "SELECT user_email FROM " . USERS_TABLE . " WHERE user_email = '" . str_replace("\'", "''", $email) . "'"; ! if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, "Couldn't obtain user email information.", "", __LINE__, __FILE__, $sql); } ! if ( $row = $db->sql_fetchrow($result) ) { return array('error' => true, 'error_msg' => $lang['Email_taken']); } return array('error' => false, 'error_msg' => ''); } --- 119,161 ---- { global $db, $lang; ! if ($email != '') { ! if (preg_match('/^[a-z0-9&\'\.\-_\+]+@[a-z0-9\-]+\.([a-z0-9\-]+\.)*?[a-z]+$/is', $email)) { $sql = "SELECT ban_email FROM " . BANLIST_TABLE; ! if ($result = $db->sql_query($sql)) ! { ! if ($row = $db->sql_fetchrow($result)) { ! do { $match_email = str_replace('*', '.*?', $row['ban_email']); ! if (preg_match('/^' . $match_email . '$/is', $email)) { + $db->sql_freeresult($result); return array('error' => true, 'error_msg' => $lang['Email_banned']); } } + while($row = $db->sql_fetchrow($result)); + } } + $db->sql_freeresult($result); $sql = "SELECT user_email FROM " . USERS_TABLE . " WHERE user_email = '" . str_replace("\'", "''", $email) . "'"; ! if (!($result = $db->sql_query($sql))) { message_die(GENERAL_ERROR, "Couldn't obtain user email information.", "", __LINE__, __FILE__, $sql); } ! if ($row = $db->sql_fetchrow($result)) { return array('error' => true, 'error_msg' => $lang['Email_taken']); } + $db->sql_freeresult($result); return array('error' => false, 'error_msg' => ''); } *************** *** 148,175 **** for($i = 0; $i < count($check_var_length); $i++) { ! if ( strlen($$check_var_length[$i]) < 2 ) { $$check_var_length[$i] = ''; } } // ICQ number has to be only numbers. ! if ( !preg_match('/^[0-9]+$/', $icq) ) { $icq = ''; } // website has to start with http://, followed by something with length at least 3 that // contains at least one dot. ! if ( $website != "" ) { ! if ( !preg_match('#^http:\/\/#i', $website) ) { $website = 'http://' . $website; } ! if ( !preg_match('#^http\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $website) ) { $website = ''; } --- 174,201 ---- for($i = 0; $i < count($check_var_length); $i++) { ! if (strlen($$check_var_length[$i]) < 2) { $$check_var_length[$i] = ''; } } // ICQ number has to be only numbers. ! if (!preg_match('/^[0-9]+$/', $icq)) { $icq = ''; } // website has to start with http://, followed by something with length at least 3 that // contains at least one dot. ! if ($website != "") { ! if (!preg_match('#^http[s]?:\/\/#i', $website)) { $website = 'http://' . $website; } ! if (!preg_match('#^http[s]?\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i', $website)) { $website = ''; } diff -crbB phpbb203/includes/page_header.php phpbb206/includes/page_header.php *** phpbb203/includes/page_header.php Sun Jun 15 14:32:15 2003 --- phpbb206/includes/page_header.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: page_header.php,v 1.106.2.5 2002/09/18 12:10:22 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: page_header.php,v 1.106.2.20 2003/06/10 20:48:19 acydburn Exp $ * * ***************************************************************************/ *************** *** 35,41 **** { $phpver = phpversion(); ! if ( $phpver >= '4.0.4pl1' && strstr($HTTP_USER_AGENT,'compatible') ) { if ( extension_loaded('zlib') ) { --- 35,43 ---- { $phpver = phpversion(); ! $useragent = (isset($_SERVER["HTTP_USER_AGENT"]) ) ? $_SERVER["HTTP_USER_AGENT"] : $HTTP_USER_AGENT; ! ! if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) ) { if ( extension_loaded('zlib') ) { *************** *** 70,76 **** // if ( $userdata['session_logged_in'] ) { ! $u_login_logout = 'login.'.$phpEx.'?logout=true'; $l_login_logout = $lang['Logout'] . ' [ ' . $userdata['username'] . ' ]'; } else --- 72,78 ---- // if ( $userdata['session_logged_in'] ) { ! $u_login_logout = 'login.'.$phpEx.'?logout=true&sid=' . $userdata['session_id']; $l_login_logout = $lang['Logout'] . ' [ ' . $userdata['username'] . ' ]'; } else *************** *** 85,115 **** // Get basic (usernames + totals) online // situation // ! $user_forum_sql = ( !empty($forum_id) ) ? "AND s.session_page = " . intval($forum_id) : ''; ! $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 WHERE u.user_id = s.session_user_id AND s.session_time >= ".( time() - 300 ) . " $user_forum_sql ORDER BY u.username ASC, s.session_ip ASC"; ! if( !($result = $db->sql_query($sql)) ) ! { message_die(GENERAL_ERROR, 'Could not obtain user/online information', '', __LINE__, __FILE__, $sql); ! } ! $userlist_ary = array(); ! $userlist_visible = array(); ! $logged_visible_online = 0; ! $logged_hidden_online = 0; ! $guests_online = 0; ! $online_userlist = ''; ! $prev_user_id = 0; ! $prev_user_ip = ''; ! ! while( $row = $db->sql_fetchrow($result) ) ! { // User is logged in and therefor not a guest if ( $row['session_logged_in'] ) { --- 87,120 ---- // Get basic (usernames + totals) online // situation // ! $logged_visible_online = 0; ! $logged_hidden_online = 0; ! $guests_online = 0; ! $online_userlist = ''; ! ! if (defined('SHOW_ONLINE')) ! { ! ! $user_forum_sql = ( !empty($forum_id) ) ? "AND s.session_page = " . intval($forum_id) : ''; ! $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 WHERE u.user_id = s.session_user_id AND s.session_time >= ".( time() - 300 ) . " $user_forum_sql ORDER BY u.username ASC, s.session_ip ASC"; ! if( !($result = $db->sql_query($sql)) ) ! { message_die(GENERAL_ERROR, 'Could not obtain user/online information', '', __LINE__, __FILE__, $sql); ! } ! $userlist_ary = array(); ! $userlist_visible = array(); ! $prev_user_id = 0; ! $prev_user_ip = ''; ! while( $row = $db->sql_fetchrow($result) ) ! { // User is logged in and therefor not a guest if ( $row['session_logged_in'] ) { *************** *** 157,174 **** } $prev_session_ip = $row['session_ip']; ! } ! if ( empty($online_userlist) ) ! { $online_userlist = $lang['None']; ! } ! $online_userlist = ( ( isset($forum_id) ) ? $lang['Browsing_forum'] : $lang['Registered_users'] ) . ' ' . $online_userlist; ! $total_online_users = $logged_visible_online + $logged_hidden_online + $guests_online; ! if ( $total_online_users > $board_config['record_online_users']) ! { $board_config['record_online_users'] = $total_online_users; $board_config['record_online_date'] = time(); --- 162,180 ---- } $prev_session_ip = $row['session_ip']; ! } ! $db->sql_freeresult($result); ! if ( empty($online_userlist) ) ! { $online_userlist = $lang['None']; ! } ! $online_userlist = ( ( isset($forum_id) ) ? $lang['Browsing_forum'] : $lang['Registered_users'] ) . ' ' . $online_userlist; ! $total_online_users = $logged_visible_online + $logged_hidden_online + $guests_online; ! if ( $total_online_users > $board_config['record_online_users']) ! { $board_config['record_online_users'] = $total_online_users; $board_config['record_online_date'] = time(); *************** *** 187,256 **** { message_die(GENERAL_ERROR, 'Could not update online user record (date)', '', __LINE__, __FILE__, $sql); } ! } ! if ( $total_online_users == 0 ) ! { $l_t_user_s = $lang['Online_users_zero_total']; ! } ! else if ( $total_online_users == 1 ) ! { $l_t_user_s = $lang['Online_user_total']; ! } ! else ! { $l_t_user_s = $lang['Online_users_total']; ! } ! if ( $logged_visible_online == 0 ) ! { $l_r_user_s = $lang['Reg_users_zero_total']; ! } ! else if ( $logged_visible_online == 1 ) ! { $l_r_user_s = $lang['Reg_user_total']; ! } ! else ! { $l_r_user_s = $lang['Reg_users_total']; ! } ! if ( $logged_hidden_online == 0 ) ! { $l_h_user_s = $lang['Hidden_users_zero_total']; ! } ! else if ( $logged_hidden_online == 1 ) ! { $l_h_user_s = $lang['Hidden_user_total']; ! } ! else ! { $l_h_user_s = $lang['Hidden_users_total']; ! } ! if ( $guests_online == 0 ) ! { $l_g_user_s = $lang['Guest_users_zero_total']; ! } ! else if ( $guests_online == 1 ) ! { $l_g_user_s = $lang['Guest_user_total']; ! } ! else ! { $l_g_user_s = $lang['Guest_users_total']; ! } ! $l_online_users = sprintf($l_t_user_s, $total_online_users); ! $l_online_users .= sprintf($l_r_user_s, $logged_visible_online); ! $l_online_users .= sprintf($l_h_user_s, $logged_hidden_online); ! $l_online_users .= sprintf($l_g_user_s, $guests_online); // // Obtain number of new private messages // if user is logged in // ! if ( $userdata['session_logged_in'] ) { if ( $userdata['user_new_privmsg'] ) { --- 193,263 ---- { message_die(GENERAL_ERROR, 'Could not update online user record (date)', '', __LINE__, __FILE__, $sql); } ! } ! if ( $total_online_users == 0 ) ! { $l_t_user_s = $lang['Online_users_zero_total']; ! } ! else if ( $total_online_users == 1 ) ! { $l_t_user_s = $lang['Online_user_total']; ! } ! else ! { $l_t_user_s = $lang['Online_users_total']; ! } ! if ( $logged_visible_online == 0 ) ! { $l_r_user_s = $lang['Reg_users_zero_total']; ! } ! else if ( $logged_visible_online == 1 ) ! { $l_r_user_s = $lang['Reg_user_total']; ! } ! else ! { $l_r_user_s = $lang['Reg_users_total']; ! } ! if ( $logged_hidden_online == 0 ) ! { $l_h_user_s = $lang['Hidden_users_zero_total']; ! } ! else if ( $logged_hidden_online == 1 ) ! { $l_h_user_s = $lang['Hidden_user_total']; ! } ! else ! { $l_h_user_s = $lang['Hidden_users_total']; ! } ! if ( $guests_online == 0 ) ! { $l_g_user_s = $lang['Guest_users_zero_total']; ! } ! else if ( $guests_online == 1 ) ! { $l_g_user_s = $lang['Guest_user_total']; ! } ! else ! { $l_g_user_s = $lang['Guest_users_total']; ! } ! $l_online_users = sprintf($l_t_user_s, $total_online_users); ! $l_online_users .= sprintf($l_r_user_s, $logged_visible_online); ! $l_online_users .= sprintf($l_h_user_s, $logged_hidden_online); ! $l_online_users .= sprintf($l_g_user_s, $guests_online); ! } // // Obtain number of new private messages // if user is logged in // ! if ( ($userdata['session_logged_in']) && (empty($gen_simple_header)) ) { if ( $userdata['user_new_privmsg'] ) { *************** *** 273,279 **** else { $s_privmsg_new = 0; ! $icon_pm = $images['pm_no_new_msg']; } } else --- 280,286 ---- else { $s_privmsg_new = 0; ! $icon_pm = $images['pm_new_msg']; } } else *************** *** 305,317 **** // // Generate HTML required for Mozilla Navigation bar // $nav_links_html = ''; $nav_link_proto = '' . "\n"; while( list($nav_item, $nav_array) = @each($nav_links) ) { if ( !empty($nav_array['url']) ) { ! $nav_links_html .= sprintf($nav_link_proto, $nav_item, $nav_array['url'], $nav_array['title']); } else { --- 312,329 ---- // // Generate HTML required for Mozilla Navigation bar // + if (!isset($nav_links)) + { + $nav_links = array(); + } + $nav_links_html = ''; $nav_link_proto = '' . "\n"; while( list($nav_item, $nav_array) = @each($nav_links) ) { if ( !empty($nav_array['url']) ) { ! $nav_links_html .= sprintf($nav_link_proto, $nav_item, append_sid($nav_array['url']), $nav_array['title']); } else { *************** *** 323,328 **** --- 335,343 ---- } } + // Format Timezone. We are unable to use array_pop here, because of PHP3 compatibility + $l_timezone = explode('.', $board_config['board_timezone']); + $l_timezone = (count($l_timezone) > 1 && $l_timezone[count($l_timezone)-1] != 0) ? $lang[sprintf('%.1f', $board_config['board_timezone'])] : $lang[number_format($board_config['board_timezone'])]; // // The following assigns all _common_ variables that may be used at any point // in a template. *************** *** 377,390 **** 'U_FAQ' => append_sid('faq.'.$phpEx), 'U_VIEWONLINE' => append_sid('viewonline.'.$phpEx), 'U_LOGIN_LOGOUT' => append_sid($u_login_logout), - 'U_MEMBERSLIST' => append_sid('memberlist.'.$phpEx), 'U_GROUP_CP' => append_sid('groupcp.'.$phpEx), 'S_CONTENT_DIRECTION' => $lang['DIRECTION'], 'S_CONTENT_ENCODING' => $lang['ENCODING'], 'S_CONTENT_DIR_LEFT' => $lang['LEFT'], 'S_CONTENT_DIR_RIGHT' => $lang['RIGHT'], ! 'S_TIMEZONE' => sprintf($lang['All_times'], $lang[number_format($board_config['board_timezone'])]), 'S_LOGIN_ACTION' => append_sid('login.'.$phpEx), 'T_HEAD_STYLESHEET' => $theme['head_stylesheet'], --- 392,404 ---- 'U_FAQ' => append_sid('faq.'.$phpEx), 'U_VIEWONLINE' => append_sid('viewonline.'.$phpEx), 'U_LOGIN_LOGOUT' => append_sid($u_login_logout), 'U_GROUP_CP' => append_sid('groupcp.'.$phpEx), 'S_CONTENT_DIRECTION' => $lang['DIRECTION'], 'S_CONTENT_ENCODING' => $lang['ENCODING'], 'S_CONTENT_DIR_LEFT' => $lang['LEFT'], 'S_CONTENT_DIR_RIGHT' => $lang['RIGHT'], ! 'S_TIMEZONE' => sprintf($lang['All_times'], $l_timezone), 'S_LOGIN_ACTION' => append_sid('login.'.$phpEx), 'T_HEAD_STYLESHEET' => $theme['head_stylesheet'], *************** *** 446,454 **** } } ! header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0'); ! header ('Expires: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT'); ! header ('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); $template->pparse('overall_header'); --- 460,480 ---- } } ! // Add no-cache control for cookies if they are set ! //$c_no_cache = (isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid']) || isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_data'])) ? 'no-cache="set-cookie", ' : ''; ! ! // Work around for "current" Apache 2 + PHP module which seems to not ! // cope with private cache control setting ! if (!empty($_SERVER['SERVER_SOFTWARE']) && strstr($_SERVER['SERVER_SOFTWARE'], 'Apache/2')) ! { ! header ('Cache-Control: no-cache, pre-check=0, post-check=0'); ! } ! else ! { ! header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0'); ! } ! header ('Expires: 0'); ! header ('Pragma: no-cache'); $template->pparse('overall_header'); diff -crbB phpbb203/includes/page_tail.php phpbb206/includes/page_tail.php *** phpbb203/includes/page_tail.php Sun Jun 15 14:32:15 2003 --- phpbb206/includes/page_tail.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: page_tail.php,v 1.27.2.1 2002/05/12 00:47:41 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: page_tail.php,v 1.27.2.2 2002/11/26 11:42:12 psotfx Exp $ * * ***************************************************************************/ *************** *** 28,34 **** // // Show the overall footer. // ! $admin_link = ( $userdata['user_level'] == ADMIN ) ? '' . $lang['Admin_panel'] . '

' : ''; $template->set_filenames(array( 'overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer.tpl' : 'simple_footer.tpl') --- 28,34 ---- // // Show the overall footer. // ! $admin_link = ( $userdata['user_level'] == ADMIN ) ? '' . $lang['Admin_panel'] . '

' : ''; $template->set_filenames(array( 'overall_footer' => ( empty($gen_simple_header) ) ? 'overall_footer.tpl' : 'simple_footer.tpl') diff -crbB phpbb203/includes/prune.php phpbb206/includes/prune.php *** phpbb203/includes/prune.php Sun Jun 15 14:32:15 2003 --- phpbb206/includes/prune.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: prune.php,v 1.19 2002/04/04 11:51:25 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: prune.php,v 1.19.2.6 2003/03/18 23:23:57 acydburn Exp $ * * ***************************************************************************/ *************** *** 27,44 **** require($phpbb_root_path . 'includes/functions_search.'.$phpEx); ! function prune($forum_id, $prune_date) { global $db, $lang; // ! // Those without polls ... // $sql = "SELECT t.topic_id FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t WHERE t.forum_id = $forum_id ! AND t.topic_vote = 0 ! AND t.topic_type <> " . POST_ANNOUNCE . " AND ( p.post_id = t.topic_last_post_id OR t.topic_last_post_id = 0 )"; if ( $prune_date != '' ) --- 27,44 ---- require($phpbb_root_path . 'includes/functions_search.'.$phpEx); ! function prune($forum_id, $prune_date, $prune_all = false) { global $db, $lang; + $prune_all = ($prune_all) ? '' : 'AND t.topic_vote = 0 AND t.topic_type <> ' . POST_ANNOUNCE; // ! // Those without polls and announcements ... unless told otherwise! // $sql = "SELECT t.topic_id FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t WHERE t.forum_id = $forum_id ! $prune_all AND ( p.post_id = t.topic_last_post_id OR t.topic_last_post_id = 0 )"; if ( $prune_date != '' ) *************** *** 56,61 **** --- 56,62 ---- { $sql_topics .= ( ( $sql_topics != '' ) ? ', ' : '' ) . $row['topic_id']; } + $db->sql_freeresult($result); if( $sql_topics != '' ) { *************** *** 73,85 **** { $sql_post .= ( ( $sql_post != '' ) ? ', ' : '' ) . $row['post_id']; } if ( $sql_post != '' ) { ! $sql = "DELETE FROM " . TOPICS_TABLE . " WHERE topic_id IN ($sql_topics)"; if ( !$db->sql_query($sql, BEGIN_TRANSACTION) ) { message_die(GENERAL_ERROR, 'Could not delete topics during prune', '', __LINE__, __FILE__, $sql); } --- 74,94 ---- { $sql_post .= ( ( $sql_post != '' ) ? ', ' : '' ) . $row['post_id']; } + $db->sql_freeresult($result); if ( $sql_post != '' ) { ! $sql = "DELETE FROM " . TOPICS_WATCH_TABLE . " WHERE topic_id IN ($sql_topics)"; if ( !$db->sql_query($sql, BEGIN_TRANSACTION) ) { + message_die(GENERAL_ERROR, 'Could not delete watched topics during prune', '', __LINE__, __FILE__, $sql); + } + + $sql = "DELETE FROM " . TOPICS_TABLE . " + WHERE topic_id IN ($sql_topics)"; + if ( !$db->sql_query($sql) ) + { message_die(GENERAL_ERROR, 'Could not delete topics during prune', '', __LINE__, __FILE__, $sql); } *************** *** 101,113 **** message_die(GENERAL_ERROR, 'Could not delete post during prune', '', __LINE__, __FILE__, $sql); } - $sql = "DELETE FROM " . SEARCH_MATCH_TABLE . " - WHERE post_id IN ($sql_post)"; - if ( !$db->sql_query($sql) ) - { - message_die(GENERAL_ERROR, 'Could not delete search matches', '', __LINE__, __FILE__, $sql); - } - remove_search_post($sql_post); return array ('topics' => $pruned_topics, 'posts' => $pruned_posts); --- 110,115 ---- diff -crbB phpbb203/includes/sessions.php phpbb206/includes/sessions.php *** phpbb203/includes/sessions.php Sun Jun 15 14:32:15 2003 --- phpbb206/includes/sessions.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: sessions.php,v 1.58.2.6 2002/07/19 22:19:08 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: sessions.php,v 1.58.2.10 2003/04/05 12:04:33 acydburn Exp $ * * ***************************************************************************/ *************** *** 37,48 **** if ( isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) || isset($HTTP_COOKIE_VARS[$cookiename . '_data']) ) { $session_id = isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) ? $HTTP_COOKIE_VARS[$cookiename . '_sid'] : ''; ! $sessiondata = isset($HTTP_COOKIE_VARS[$cookiename . '_data']) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookiename . '_data'])) : ''; $sessionmethod = SESSION_METHOD_COOKIE; } else { ! $sessiondata = ''; $session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : ''; $sessionmethod = SESSION_METHOD_GET; } --- 37,48 ---- if ( isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) || isset($HTTP_COOKIE_VARS[$cookiename . '_data']) ) { $session_id = isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) ? $HTTP_COOKIE_VARS[$cookiename . '_sid'] : ''; ! $sessiondata = isset($HTTP_COOKIE_VARS[$cookiename . '_data']) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookiename . '_data'])) : array(); $sessionmethod = SESSION_METHOD_COOKIE; } else { ! $sessiondata = array(); $session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : ''; $sessionmethod = SESSION_METHOD_GET; } *************** *** 84,90 **** // No match; don't login, set as anonymous user $login = 0; $enable_autologin = 0; ! $user_id = ANONYMOUS; } } else --- 84,90 ---- // No match; don't login, set as anonymous user $login = 0; $enable_autologin = 0; ! $user_id = $userdata['user_id'] = ANONYMOUS; } } else *************** *** 92,98 **** // Autologin is not set. Don't login, set as anonymous user $login = 0; $enable_autologin = 0; ! $user_id = ANONYMOUS; } } else --- 92,98 ---- // Autologin is not set. Don't login, set as anonymous user $login = 0; $enable_autologin = 0; ! $user_id = $userdata['user_id'] = ANONYMOUS; } } else *************** *** 182,188 **** setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure); setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure); ! $SID = ( $sessionmethod == SESSION_METHOD_GET ) ? 'sid=' . $session_id : ''; return $userdata; } --- 182,188 ---- setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure); setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure); ! $SID = 'sid=' . $session_id; return $userdata; } *************** *** 206,218 **** if ( isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) || isset($HTTP_COOKIE_VARS[$cookiename . '_data']) ) { ! $sessiondata = isset( $HTTP_COOKIE_VARS[$cookiename . '_data'] ) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookiename . '_data'])) : ''; $session_id = isset( $HTTP_COOKIE_VARS[$cookiename . '_sid'] ) ? $HTTP_COOKIE_VARS[$cookiename . '_sid'] : ''; $sessionmethod = SESSION_METHOD_COOKIE; } else { ! $sessiondata = ''; $session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : ''; $sessionmethod = SESSION_METHOD_GET; } --- 206,218 ---- if ( isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) || isset($HTTP_COOKIE_VARS[$cookiename . '_data']) ) { ! $sessiondata = isset( $HTTP_COOKIE_VARS[$cookiename . '_data'] ) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookiename . '_data'])) : array(); $session_id = isset( $HTTP_COOKIE_VARS[$cookiename . '_sid'] ) ? $HTTP_COOKIE_VARS[$cookiename . '_sid'] : ''; $sessionmethod = SESSION_METHOD_COOKIE; } else { ! $sessiondata = array(); $session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : ''; $sessionmethod = SESSION_METHOD_GET; } *************** *** 250,258 **** $ip_check_s = substr($userdata['session_ip'], 0, 6); $ip_check_u = substr($user_ip, 0, 6); ! if ( $ip_check_s == $ip_check_u ) { ! $SID = ( $sessionmethod == SESSION_METHOD_GET ) ? 'sid=' . $session_id : ''; // // Only update session DB a minute or so after last update --- 250,258 ---- $ip_check_s = substr($userdata['session_ip'], 0, 6); $ip_check_u = substr($user_ip, 0, 6); ! if ($ip_check_s == $ip_check_u) { ! $SID = ($sessionmethod == SESSION_METHOD_GET || defined('IN_ADMIN')) ? 'sid=' . $session_id : ''; // // Only update session DB a minute or so after last update *************** *** 329,334 **** --- 329,336 ---- $cookiedomain = $board_config['cookie_domain']; $cookiesecure = $board_config['cookie_secure']; + $current_time = time(); + // // Pull cookiedata or grab the URI propagated sid // *************** *** 370,381 **** { global $SID; ! if ( !empty($SID) && !eregi('sid=', $url) ) { $url .= ( ( strpos($url, '?') != false ) ? ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID; } ! return($url); } ?> \ No newline at end of file --- 372,383 ---- { global $SID; ! if ( !empty($SID) && !preg_match('#sid=#', $url) ) { $url .= ( ( strpos($url, '?') != false ) ? ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID; } ! return $url; } ?> \ No newline at end of file diff -crbB phpbb203/includes/smtp.php phpbb206/includes/smtp.php *** phpbb203/includes/smtp.php Sun Jun 15 14:32:15 2003 --- phpbb206/includes/smtp.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: smtp.php,v 1.16.2.1 2002/07/19 13:48:24 psotfx Exp $ * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: smtp.php,v 1.16.2.9 2003/07/18 16:34:01 acydburn Exp $ * ***************************************************************************/ *************** *** 25,73 **** // by SirSir to allow multiline responses when // using SMTP Extensions // ! function server_parse($socket, $response) { ! while ( substr($server_response,3,1) != ' ' ) { ! if( !( $server_response = fgets($socket, 256) ) ) { ! message_die(GENERAL_ERROR, "Couldn't get mail server response codes", "", __LINE__, __FILE__); } } ! if( !( substr($server_response, 0, 3) == $response ) ) { ! message_die(GENERAL_ERROR, "Ran into problems sending Mail. Response: $server_response", "", __LINE__, __FILE__); } } ! /**************************************************************************** ! * Function: smtpmail ! * Description: This is a functional replacement for php's builtin mail ! * function, that uses smtp. ! * Usage: The usage for this function is identical to that of php's ! * built in mail function. ! ****************************************************************************/ ! function smtpmail($mail_to, $subject, $message, $headers = "") { - // For now I'm using an array based $smtp_vars to hold the smtp server - // info, but it should probably change to $board_config... - // then the relevant info would be $board_config['smtp_host'] and - // $board_config['smtp_port']. global $board_config; - // // Fix any bare linefeeds in the message to make it RFC821 Compliant. ! // ! $message = preg_replace("/(? 1) { ! $headers = join("\r\n", $headers); } else { --- 26,62 ---- // by SirSir to allow multiline responses when // using SMTP Extensions // ! function server_parse($socket, $response, $line = __LINE__) { ! while (substr($server_response, 3, 1) != ' ') { ! if (!($server_response = fgets($socket, 256))) { ! message_die(GENERAL_ERROR, "Couldn't get mail server response codes", "", $line, __FILE__); } } ! if (!(substr($server_response, 0, 3) == $response)) { ! message_die(GENERAL_ERROR, "Ran into problems sending Mail. Response: $server_response", "", $line, __FILE__); } } ! // Replacement or substitute for PHP's mail command ! function smtpmail($mail_to, $subject, $message, $headers = '') { global $board_config; // Fix any bare linefeeds in the message to make it RFC821 Compliant. ! $message = preg_replace("#(? 1) { ! $headers = join("\n", $headers); } else { *************** *** 76,204 **** } $headers = chop($headers); - // // Make sure there are no bare linefeeds in the headers ! // ! $headers = preg_replace("/(?\r\n"); ! server_parse($socket, "250"); // Specify each user to send to and build to header. ! $to_header = "To: "; ! @reset( $mail_to_array ); ! while( list( , $mail_to_address ) = each( $mail_to_array )) ! { ! // // Add an additional bit of error checking to the To field. ! // ! $mail_to_address = trim($mail_to_address); ! if ( preg_match('/[^ ]+\@[^ ]+/', $mail_to_address) ) { ! fputs( $socket, "RCPT TO: <$mail_to_address>\r\n" ); ! server_parse( $socket, "250" ); ! } ! $to_header .= ( ( $mail_to_address != '' ) ? ', ' : '' ) . "<$mail_to_address>"; } // Ok now do the CC and BCC fields... ! @reset( $bcc ); ! while( list( , $bcc_address ) = each( $bcc )) { - // // Add an additional bit of error checking to bcc header... ! // ! $bcc_address = trim( $bcc_address ); ! if ( preg_match('/[^ ]+\@[^ ]+/', $bcc_address) ) { ! fputs( $socket, "RCPT TO: <$bcc_address>\r\n" ); ! server_parse( $socket, "250" ); } } ! @reset( $cc ); ! while( list( , $cc_address ) = each( $cc )) { - // // Add an additional bit of error checking to cc header ! // ! $cc_address = trim( $cc_address ); ! if ( preg_match('/[^ ]+\@[^ ]+/', $cc_address) ) { fputs($socket, "RCPT TO: <$cc_address>\r\n"); ! server_parse($socket, "250"); } } // Ok now we tell the server we are ready to start sending data fputs($socket, "DATA\r\n"); --- 65,182 ---- } $headers = chop($headers); // Make sure there are no bare linefeeds in the headers ! $headers = preg_replace('#(?\r\n"); ! server_parse($socket, "250", __LINE__); // Specify each user to send to and build to header. ! $to_header = ''; ! // Add an additional bit of error checking to the To field. ! $mail_to = (trim($mail_to) == '') ? 'Undisclosed-recipients:;' : trim($mail_to); ! if (preg_match('#[^ ]+\@[^ ]+#', $mail_to)) { ! fputs($socket, "RCPT TO: <$mail_to>\r\n"); ! server_parse($socket, "250", __LINE__); } + // Ok now do the CC and BCC fields... ! @reset($bcc); ! while(list(, $bcc_address) = each($bcc)) { // Add an additional bit of error checking to bcc header... ! $bcc_address = trim($bcc_address); ! if (preg_match('#[^ ]+\@[^ ]+#', $bcc_address)) { ! fputs($socket, "RCPT TO: <$bcc_address>\r\n"); ! server_parse($socket, "250", __LINE__); } } ! ! @reset($cc); ! while(list(, $cc_address) = each($cc)) { // Add an additional bit of error checking to cc header ! $cc_address = trim($cc_address); ! if (preg_match('#[^ ]+\@[^ ]+#', $cc_address)) { fputs($socket, "RCPT TO: <$cc_address>\r\n"); ! server_parse($socket, "250", __LINE__); } } + // Ok now we tell the server we are ready to start sending data fputs($socket, "DATA\r\n"); *************** *** 203,215 **** fputs($socket, "DATA\r\n"); // This is the last response code we look for until the end of the message. ! server_parse($socket, "354"); // Send the Subject Line... fputs($socket, "Subject: $subject\r\n"); // Now the To Header. ! fputs($socket, "$to_header\r\n"); // Now any custom headers.... fputs($socket, "$headers\r\n\r\n"); --- 181,193 ---- fputs($socket, "DATA\r\n"); // This is the last response code we look for until the end of the message. ! server_parse($socket, "354", __LINE__); // Send the Subject Line... fputs($socket, "Subject: $subject\r\n"); // Now the To Header. ! fputs($socket, "To: $mail_to\r\n"); // Now any custom headers.... fputs($socket, "$headers\r\n\r\n"); *************** *** 219,225 **** // Ok the all the ingredients are mixed in let's cook this puppy... fputs($socket, ".\r\n"); ! server_parse($socket, "250"); // Now tell the server we are done and close the socket... fputs($socket, "QUIT\r\n"); --- 197,203 ---- // Ok the all the ingredients are mixed in let's cook this puppy... fputs($socket, ".\r\n"); ! server_parse($socket, "250", __LINE__); // Now tell the server we are done and close the socket... fputs($socket, "QUIT\r\n"); diff -crbB phpbb203/includes/template.php phpbb206/includes/template.php *** phpbb203/includes/template.php Sun Jun 15 14:32:15 2003 --- phpbb206/includes/template.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: template.php,v 1.10 2002/04/02 21:13:47 the_systech Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: template.php,v 1.10.2.3 2002/12/21 19:09:57 psotfx Exp $ * * ***************************************************************************/ *************** *** 230,236 **** // Check if it's an absolute or relative path. if (substr($filename, 0, 1) != '/') { ! $filename = $this->root . '/' . $filename; } if (!file_exists($filename)) --- 230,236 ---- // Check if it's an absolute or relative path. if (substr($filename, 0, 1) != '/') { ! $filename = phpbb_realpath($this->root . '/' . $filename); } if (!file_exists($filename)) *************** *** 331,337 **** if ($block_nesting_level < 2) { // Block is not nested. ! $code_lines[$i] = '$_' . $a[1] . '_count = ( isset($this->_tpldata[\'' . $n[1] . '.\']) ) ? sizeof($this->_tpldata[\'' . $n[1] . '.\']) : 0;'; $code_lines[$i] .= "\n" . 'for ($_' . $n[1] . '_i = 0; $_' . $n[1] . '_i < $_' . $n[1] . '_count; $_' . $n[1] . '_i++)'; $code_lines[$i] .= "\n" . '{'; } --- 331,337 ---- if ($block_nesting_level < 2) { // Block is not nested. ! $code_lines[$i] = '$_' . $n[1] . '_count = ( isset($this->_tpldata[\'' . $n[1] . '.\']) ) ? sizeof($this->_tpldata[\'' . $n[1] . '.\']) : 0;'; $code_lines[$i] .= "\n" . 'for ($_' . $n[1] . '_i = 0; $_' . $n[1] . '_i < $_' . $n[1] . '_count; $_' . $n[1] . '_i++)'; $code_lines[$i] .= "\n" . '{'; } *************** *** 347,353 **** // current indices of all parent blocks. $varref = $this->generate_block_data_ref($namespace, false); // Create the for loop code to iterate over this block. ! $code_lines[$i] = '$_' . $a[1] . '_count = ( isset(' . $varref . ') ) ? sizeof(' . $varref . ') : 0;'; $code_lines[$i] .= "\n" . 'for ($_' . $n[1] . '_i = 0; $_' . $n[1] . '_i < $_' . $n[1] . '_count; $_' . $n[1] . '_i++)'; $code_lines[$i] .= "\n" . '{'; } --- 347,353 ---- // current indices of all parent blocks. $varref = $this->generate_block_data_ref($namespace, false); // Create the for loop code to iterate over this block. ! $code_lines[$i] = '$_' . $n[1] . '_count = ( isset(' . $varref . ') ) ? sizeof(' . $varref . ') : 0;'; $code_lines[$i] .= "\n" . 'for ($_' . $n[1] . '_i = 0; $_' . $n[1] . '_i < $_' . $n[1] . '_count; $_' . $n[1] . '_i++)'; $code_lines[$i] .= "\n" . '{'; } diff -crbB phpbb203/includes/usercp_activate.php phpbb206/includes/usercp_activate.php *** phpbb203/includes/usercp_activate.php Sun Jun 15 14:32:15 2003 --- phpbb206/includes/usercp_activate.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: usercp_activate.php,v 1.6.2.3 2002/05/20 00:21:38 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: usercp_activate.php,v 1.6.2.7 2003/05/03 23:24:02 acydburn Exp $ * * ***************************************************************************/ *************** *** 27,33 **** exit; } ! $sql = "SELECT user_active, user_id, user_email, user_newpasswd, user_lang, user_actkey FROM " . USERS_TABLE . " WHERE user_id = " . intval($HTTP_GET_VARS[POST_USERS_URL]); if ( !($result = $db->sql_query($sql)) ) --- 27,33 ---- exit; } ! $sql = "SELECT user_active, user_id, username, user_email, user_newpasswd, user_lang, user_actkey FROM " . USERS_TABLE . " WHERE user_id = " . intval($HTTP_GET_VARS[POST_USERS_URL]); if ( !($result = $db->sql_query($sql)) ) *************** *** 37,43 **** if ( $row = $db->sql_fetchrow($result) ) { ! if ( $row['user_active'] && $row['user_actkey'] == '' ) { $template->assign_vars(array( 'META' => '') --- 37,43 ---- if ( $row = $db->sql_fetchrow($result) ) { ! if ( $row['user_active'] && trim($row['user_actkey']) == '' ) { $template->assign_vars(array( 'META' => '') *************** *** 45,51 **** 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 = ''" : ''; --- 45,51 ---- message_die(GENERAL_MESSAGE, $lang['Already_activated']); } ! else if ((trim($row['user_actkey']) == trim($HTTP_GET_VARS['act_key'])) && (trim($row['user_actkey']) != '')) { $sql_update_pass = ( $row['user_newpasswd'] != '' ) ? ", user_password = '" . str_replace("\'", "''", $row['user_newpasswd']) . "', user_newpasswd = ''" : ''; *************** *** 57,79 **** 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('
', "\n", "-- \n" . $board_config['board_email_sig'])) ); $emailer->send(); $emailer->reset(); --- 57,79 ---- message_die(GENERAL_ERROR, 'Could not update users table', '', __LINE__, __FILE__, $sql_update); } ! if ( intval($board_config['require_activation']) == USER_ACTIVATION_ADMIN && $sql_update_pass == '' ) { include($phpbb_root_path . 'includes/emailer.'.$phpEx); $emailer = new emailer($board_config['smtp_delivery']); ! $emailer->from($board_config['board_email']); ! $emailer->replyto($board_config['board_email']); $emailer->use_template('admin_welcome_activated', $row['user_lang']); $emailer->email_address($row['user_email']); ! $emailer->set_subject($lang['Account_activated_subject']); $emailer->assign_vars(array( 'SITENAME' => $board_config['sitename'], ! 'USERNAME' => $row['username'], 'PASSWORD' => $password_confirm, ! 'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('
', "\n", "-- \n" . $board_config['board_email_sig']) : '') ); $emailer->send(); $emailer->reset(); diff -crbB phpbb203/includes/usercp_avatar.php phpbb206/includes/usercp_avatar.php *** phpbb203/includes/usercp_avatar.php Sun Jun 15 14:32:15 2003 --- phpbb206/includes/usercp_avatar.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: usercp_avatar.php,v 1.8.2.8 2002/08/07 17:20:31 dougk_ff7 Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: usercp_avatar.php,v 1.8.2.17 2003/03/04 21:02:36 acydburn Exp $ * * ***************************************************************************/ *************** *** 53,59 **** if ( $avatar_type == USER_AVATAR_UPLOAD && $avatar_file != '' ) { ! if ( @file_exists('./' . $board_config['avatar_path'] . '/' . $avatar_file) ) { @unlink('./' . $board_config['avatar_path'] . '/' . $avatar_file); } --- 53,59 ---- if ( $avatar_type == USER_AVATAR_UPLOAD && $avatar_file != '' ) { ! if ( @file_exists(@phpbb_realpath('./' . $board_config['avatar_path'] . '/' . $avatar_file)) ) { @unlink('./' . $board_config['avatar_path'] . '/' . $avatar_file); } *************** *** 65,71 **** function user_avatar_gallery($mode, &$error, &$error_msg, $avatar_filename) { global $board_config; ! if ( file_exists($board_config['avatar_gallery_path'] . '/' . $avatar_filename) && ($mode == 'editprofile') ) { $return = ", user_avatar = '" . str_replace("\'", "''", $avatar_filename) . "', user_avatar_type = " . USER_AVATAR_GALLERY; } --- 65,71 ---- function user_avatar_gallery($mode, &$error, &$error_msg, $avatar_filename) { global $board_config; ! if ( file_exists(@phpbb_realpath($board_config['avatar_gallery_path'] . '/' . $avatar_filename)) && ($mode == 'editprofile') ) { $return = ", user_avatar = '" . str_replace("\'", "''", $avatar_filename) . "', user_avatar_type = " . USER_AVATAR_GALLERY; } *************** *** 83,89 **** $avatar_filename = 'http://' . $avatar_filename; } ! if ( !preg_match('#^((http)|(ftp):\/\/[a-z0-9\-]+?\.([a-z0-9\-]+\.)+[a-z]+(:[0-9]+)*\/.*?\.(gif|jpg|jpeg|png)$)#is', $avatar_filename) ) { $error = true; $error_msg = ( !empty($error_msg) ) ? $error_msg . '
' . $lang['Wrong_remote_avatar_format'] : $lang['Wrong_remote_avatar_format']; --- 83,89 ---- $avatar_filename = 'http://' . $avatar_filename; } ! if ( !preg_match('#^((http)|(ftp):\/\/[\w\-]+?\.([\w\-]+\.)+[\w]+(:[0-9]+)*\/.*?\.(gif|jpg|jpeg|png)$)#is', $avatar_filename) ) { $error = true; $error_msg = ( !empty($error_msg) ) ? $error_msg . '
' . $lang['Wrong_remote_avatar_format'] : $lang['Wrong_remote_avatar_format']; *************** *** 96,102 **** function user_avatar_upload($mode, $avatar_mode, &$current_avatar, &$current_type, &$error, &$error_msg, $avatar_filename, $avatar_realname, $avatar_filesize, $avatar_filetype) { ! global $board_config, $user_ip, $db, $lang; $ini_val = ( @phpversion() >= '4.0.0' ) ? 'ini_get' : 'get_cfg_var'; --- 96,102 ---- function user_avatar_upload($mode, $avatar_mode, &$current_avatar, &$current_type, &$error, &$error_msg, $avatar_filename, $avatar_realname, $avatar_filesize, $avatar_filetype) { ! global $board_config, $db, $lang; $ini_val = ( @phpversion() >= '4.0.0' ) ? 'ini_get' : 'get_cfg_var'; *************** *** 130,136 **** } @fclose($fsock); ! if ( !preg_match('/Content-Length\: ([0-9]+)[^\/ ][\s]+/i', $avatar_data, $file_data1) || !preg_match('/Content-Type\: image\/[x\-]*([a-z]+)[\s]+/i', $avatar_data, $file_data2) ) { $error = true; $error_msg = ( !empty($error_msg) ) ? $error_msg . '
' . $lang['File_no_data'] : $lang['File_no_data']; --- 130,136 ---- } @fclose($fsock); ! if (!preg_match('#Content-Length\: ([0-9]+)[^ /][\s]+#i', $avatar_data, $file_data1) || !preg_match('#Content-Type\: image/[x\-]*([a-z]+)[\s]+#i', $avatar_data, $file_data2)) { $error = true; $error_msg = ( !empty($error_msg) ) ? $error_msg . '
' . $lang['File_no_data'] : $lang['File_no_data']; *************** *** 145,151 **** $avatar_data = substr($avatar_data, strlen($avatar_data) - $avatar_filesize, $avatar_filesize); $tmp_path = ( !@$ini_val('safe_mode') ) ? '/tmp' : './' . $board_config['avatar_path'] . '/tmp'; ! $tmp_filename = tempnam($tmp_path, uniqid($user_ip) . '-'); $fptr = @fopen($tmp_filename, 'wb'); $bytes_written = @fwrite($fptr, $avatar_data, $avatar_filesize); --- 145,151 ---- $avatar_data = substr($avatar_data, strlen($avatar_data) - $avatar_filesize, $avatar_filesize); $tmp_path = ( !@$ini_val('safe_mode') ) ? '/tmp' : './' . $board_config['avatar_path'] . '/tmp'; ! $tmp_filename = tempnam($tmp_path, uniqid(rand()) . '-'); $fptr = @fopen($tmp_filename, 'wb'); $bytes_written = @fwrite($fptr, $avatar_data, $avatar_filesize); *************** *** 167,173 **** $error_msg = ( !empty($error_msg) ) ? $error_msg . '
' . $l_avatar_size : $l_avatar_size; } } ! else if ( $avatar_mode == 'local' && file_exists($avatar_filename) && preg_match('/\.(jpg|jpeg|gif|png)$/i', $avatar_realname) ) { if ( $avatar_filesize <= $board_config['avatar_filesize'] && $avatar_filesize > 0 ) { --- 167,173 ---- $error_msg = ( !empty($error_msg) ) ? $error_msg . '
' . $l_avatar_size : $l_avatar_size; } } ! else if ( ( file_exists(@phpbb_realpath($avatar_filename)) ) && preg_match('/\.(jpg|jpeg|gif|png)$/i', $avatar_realname) ) { if ( $avatar_filesize <= $board_config['avatar_filesize'] && $avatar_filesize > 0 ) { *************** *** 193,203 **** if ( $width <= $board_config['avatar_max_width'] && $height <= $board_config['avatar_max_height'] ) { ! $new_filename = uniqid($user_ip) . $imgtype; if ( $mode == 'editprofile' && $current_type == USER_AVATAR_UPLOAD && $current_avatar != '' ) { ! if ( file_exists('./' . $board_config['avatar_path'] . '/' . $current_avatar) ) { @unlink('./' . $board_config['avatar_path'] . '/' . $current_avatar); } --- 193,203 ---- if ( $width <= $board_config['avatar_max_width'] && $height <= $board_config['avatar_max_height'] ) { ! $new_filename = uniqid(rand()) . $imgtype; if ( $mode == 'editprofile' && $current_type == USER_AVATAR_UPLOAD && $current_avatar != '' ) { ! if ( file_exists(@phpbb_realpath('./' . $board_config['avatar_path'] . '/' . $current_avatar)) ) { @unlink('./' . $board_config['avatar_path'] . '/' . $current_avatar); } *************** *** 242,248 **** return $avatar_sql; } ! 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 $phpbb_root_path, $phpEx; --- 242,248 ---- return $avatar_sql; } ! 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, &$popup_pm, &$notifyreply, &$attachsig, &$allowhtml, &$allowbbcode, &$allowsmilies, &$hideonline, &$style, &$language, &$timezone, &$dateformat, &$session_id) { global $board_config, $db, $template, $lang, $images, $theme; global $phpbb_root_path, $phpEx; *************** *** 318,326 **** } } ! $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 = ''; for($i = 0; $i < count($params); $i++) { --- 318,326 ---- } } ! $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', 'popup_pm', 'notifyreply', 'attachsig', 'allowhtml', 'allowbbcode', 'allowsmilies', 'hideonline', 'style', 'language', 'timezone', 'dateformat'); ! $s_hidden_vars = ''; for($i = 0; $i < count($params); $i++) { diff -crbB phpbb203/includes/usercp_email.php phpbb206/includes/usercp_email.php *** phpbb203/includes/usercp_email.php Sun Jun 15 14:32:15 2003 --- phpbb206/includes/usercp_email.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: usercp_email.php,v 1.7.2.4 2002/08/03 22:24:13 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: usercp_email.php,v 1.7.2.13 2003/06/06 18:02:15 acydburn Exp $ * * ***************************************************************************/ *************** *** 27,32 **** --- 27,38 ---- exit; } + // Is send through board enabled? No, return to index + if (!$board_config['board_email_form']) + { + redirect(append_sid("index.$phpEx", true)); + } + if ( !empty($HTTP_GET_VARS[POST_USERS_URL]) || !empty($HTTP_POST_VARS[POST_USERS_URL]) ) { $user_id = ( !empty($HTTP_GET_VARS[POST_USERS_URL]) ) ? intval($HTTP_GET_VARS[POST_USERS_URL]) : intval($HTTP_POST_VARS[POST_USERS_URL]); *************** *** 38,45 **** 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 --- 44,50 ---- if ( !$userdata['session_logged_in'] ) { ! redirect(append_sid("login.$phpEx?redirect=profile.$phpEx&mode=email&" . POST_USERS_URL . "=$user_id", true)); } $sql = "SELECT username, user_email, user_viewemail, user_lang *************** *** 94,101 **** include($phpbb_root_path . 'includes/emailer.'.$phpEx); $emailer = new emailer($board_config['smtp_delivery']); ! $email_headers = 'Return-Path: ' . $userdata['user_email'] . "\nFrom: " . $userdata['user_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) . "\n"; --- 99,108 ---- include($phpbb_root_path . 'includes/emailer.'.$phpEx); $emailer = new emailer($board_config['smtp_delivery']); ! $emailer->from($userdata['user_email']); ! $emailer->replyto($userdata['user_email']); ! ! $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) . "\n"; *************** *** 117,127 **** 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'], --- 124,134 ---- if ( !empty($HTTP_POST_VARS['cc_email']) ) { ! $emailer->from($userdata['user_email']); ! $emailer->replyto($userdata['user_email']); $emailer->use_template('profile_send_email'); $emailer->email_address($userdata['user_email']); $emailer->set_subject($subject); $emailer->assign_vars(array( 'SITENAME' => $board_config['sitename'], *************** *** 170,176 **** $template->assign_vars(array( 'USERNAME' => $username, ! 'S_POST_ACTION' => append_sid("profile.$phpEx?&mode=email&" . POST_USERS_URL . "=$user_id"), 'L_SEND_EMAIL_MSG' => $lang['Send_email_msg'], 'L_RECIPIENT' => $lang['Recipient'], --- 177,184 ---- $template->assign_vars(array( 'USERNAME' => $username, ! 'S_HIDDEN_FIELDS' => '', ! 'S_POST_ACTION' => append_sid("profile.$phpEx?mode=email&" . POST_USERS_URL . "=$user_id"), 'L_SEND_EMAIL_MSG' => $lang['Send_email_msg'], 'L_RECIPIENT' => $lang['Recipient'], diff -crbB phpbb203/includes/usercp_register.php phpbb206/includes/usercp_register.php *** phpbb203/includes/usercp_register.php Sun Jun 15 14:32:15 2003 --- phpbb206/includes/usercp_register.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: usercp_register.php,v 1.20.2.20 2002/09/20 11:40:38 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: usercp_register.php,v 1.20.2.54 2003/07/18 16:34:01 acydburn Exp $ * * ***************************************************************************/ *************** *** 27,39 **** exit; } // --------------------------------------- // Load agreement template since user has not yet // agreed to registration conditions/coppa // function show_coppa() { ! global $template, $lang, $phpbb_root_path, $phpEx; $template->set_filenames(array( 'body' => 'agreement.tpl') --- 27,42 ---- exit; } + $unhtml_specialchars_match = array('#>#', '#<#', '#"#', '#&#'); + $unhtml_specialchars_replace = array('>', '<', '"', '&'); + // --------------------------------------- // Load agreement template since user has not yet // agreed to registration conditions/coppa // function show_coppa() { ! global $userdata, $template, $lang, $phpbb_root_path, $phpEx; $template->set_filenames(array( 'body' => 'agreement.tpl') *************** *** 87,102 **** if ( $mode == 'editprofile' ) { $user_id = intval($HTTP_POST_VARS['user_id']); ! $current_email = trim(strip_tags(htmlspecialchars($HTTP_POST_VARS['current_email']))); } $strip_var_list = array('username' => 'username', 'email' => 'email', 'icq' => 'icq', 'aim' => 'aim', 'msn' => 'msn', 'yim' => 'yim', 'website' => 'website', 'location' => 'location', 'occupation' => 'occupation', 'interests' => 'interests'); while( list($var, $param) = @each($strip_var_list) ) { if ( !empty($HTTP_POST_VARS[$param]) ) { ! $$var = trim(strip_tags($HTTP_POST_VARS[$param])); } } --- 90,108 ---- if ( $mode == 'editprofile' ) { $user_id = intval($HTTP_POST_VARS['user_id']); ! $current_email = trim(htmlspecialchars($HTTP_POST_VARS['current_email'])); } $strip_var_list = array('username' => 'username', 'email' => 'email', 'icq' => 'icq', 'aim' => 'aim', 'msn' => 'msn', 'yim' => 'yim', 'website' => 'website', 'location' => 'location', 'occupation' => 'occupation', 'interests' => 'interests'); + // Strip all tags from data ... may p**s some people off, bah, strip_tags is + // doing the job but can still break HTML output ... have no choice, have + // to use htmlspecialchars ... be prepared to be moaned at. while( list($var, $param) = @each($strip_var_list) ) { if ( !empty($HTTP_POST_VARS[$param]) ) { ! $$var = trim(htmlspecialchars($HTTP_POST_VARS[$param])); } } *************** *** 110,117 **** } } - $username = str_replace(' ', '', $username); - $email = htmlspecialchars($email); $signature = str_replace('
', "\n", $signature); // Run some validation on the optional fields. These are pass-by-ref, so they'll be changed to --- 116,121 ---- *************** *** 122,128 **** $allowviewonline = ( isset($HTTP_POST_VARS['hideonline']) ) ? ( ($HTTP_POST_VARS['hideonline']) ? 0 : TRUE ) : TRUE; $notifyreply = ( isset($HTTP_POST_VARS['notifyreply']) ) ? ( ($HTTP_POST_VARS['notifyreply']) ? TRUE : 0 ) : 0; $notifypm = ( isset($HTTP_POST_VARS['notifypm']) ) ? ( ($HTTP_POST_VARS['notifypm']) ? TRUE : 0 ) : TRUE; ! $popuppm = ( isset($HTTP_POST_VARS['popup_pm']) ) ? ( ($HTTP_POST_VARS['popup_pm']) ? TRUE : 0 ) : TRUE; if ( $mode == 'register' ) { --- 126,132 ---- $allowviewonline = ( isset($HTTP_POST_VARS['hideonline']) ) ? ( ($HTTP_POST_VARS['hideonline']) ? 0 : TRUE ) : TRUE; $notifyreply = ( isset($HTTP_POST_VARS['notifyreply']) ) ? ( ($HTTP_POST_VARS['notifyreply']) ? TRUE : 0 ) : 0; $notifypm = ( isset($HTTP_POST_VARS['notifypm']) ) ? ( ($HTTP_POST_VARS['notifypm']) ? TRUE : 0 ) : TRUE; ! $popup_pm = ( isset($HTTP_POST_VARS['popup_pm']) ) ? ( ($HTTP_POST_VARS['popup_pm']) ? TRUE : 0 ) : TRUE; if ( $mode == 'register' ) { *************** *** 138,144 **** $allowhtml = ( isset($HTTP_POST_VARS['allowhtml']) ) ? ( ($HTTP_POST_VARS['allowhtml']) ? TRUE : 0 ) : $userdata['user_allowhtml']; $allowbbcode = ( isset($HTTP_POST_VARS['allowbbcode']) ) ? ( ($HTTP_POST_VARS['allowbbcode']) ? TRUE : 0 ) : $userdata['user_allowbbcode']; ! $allowsmilies = ( isset($HTTP_POST_VARS['allowsmilies']) ) ? ( ($HTTP_POST_VARS['allowsmilies']) ? TRUE : 0 ) : $userdata['user_allowsmiles']; } $user_style = ( isset($HTTP_POST_VARS['style']) ) ? intval($HTTP_POST_VARS['style']) : $board_config['default_style']; --- 142,148 ---- $allowhtml = ( isset($HTTP_POST_VARS['allowhtml']) ) ? ( ($HTTP_POST_VARS['allowhtml']) ? TRUE : 0 ) : $userdata['user_allowhtml']; $allowbbcode = ( isset($HTTP_POST_VARS['allowbbcode']) ) ? ( ($HTTP_POST_VARS['allowbbcode']) ? TRUE : 0 ) : $userdata['user_allowbbcode']; ! $allowsmilies = ( isset($HTTP_POST_VARS['allowsmilies']) ) ? ( ($HTTP_POST_VARS['allowsmilies']) ? TRUE : 0 ) : $userdata['user_allowsmile']; } $user_style = ( isset($HTTP_POST_VARS['style']) ) ? intval($HTTP_POST_VARS['style']) : $board_config['default_style']; *************** *** 147,153 **** { if ( preg_match('/^[a-z_]+$/i', $HTTP_POST_VARS['language']) ) { ! $user_lang = $HTTP_POST_VARS['language']; } else { --- 151,157 ---- { if ( preg_match('/^[a-z_]+$/i', $HTTP_POST_VARS['language']) ) { ! $user_lang = htmlspecialchars($HTTP_POST_VARS['language']); } else { *************** *** 161,169 **** } $user_timezone = ( isset($HTTP_POST_VARS['timezone']) ) ? doubleval($HTTP_POST_VARS['timezone']) : $board_config['board_timezone']; - $user_dateformat = ( !empty($HTTP_POST_VARS['dateformat']) ) ? trim($HTTP_POST_VARS['dateformat']) : $board_config['default_dateformat']; ! $user_avatar_local = ( isset($HTTP_POST_VARS['avatarselect']) && !empty($HTTP_POST_VARS['submitavatar']) && $board_config['allow_avatar_local'] ) ? htmlspecialchars($HTTP_POST_VARS['avatarselect']) : ( ( isset($HTTP_POST_VARS['avatarlocal']) ) ? htmlspecialchars($HTTP_POST_VARS['avatarlocal']) : '' ); $user_avatar_remoteurl = ( !empty($HTTP_POST_VARS['avatarremoteurl']) ) ? trim(htmlspecialchars($HTTP_POST_VARS['avatarremoteurl'])) : ''; $user_avatar_upload = ( !empty($HTTP_POST_VARS['avatarurl']) ) ? trim($HTTP_POST_VARS['avatarurl']) : ( ( $HTTP_POST_FILES['avatar']['tmp_name'] != "none") ? $HTTP_POST_FILES['avatar']['tmp_name'] : '' ); --- 165,183 ---- } $user_timezone = ( isset($HTTP_POST_VARS['timezone']) ) ? doubleval($HTTP_POST_VARS['timezone']) : $board_config['board_timezone']; ! $sql = "SELECT config_value ! FROM " . CONFIG_TABLE . " ! WHERE config_name = 'default_dateformat'"; ! if ( !($result = $db->sql_query($sql)) ) ! { ! message_die(GENERAL_ERROR, 'Could not select default dateformat', '', __LINE__, __FILE__, $sql); ! } ! $row = $db->sql_fetchrow($result); ! $board_config['default_dateformat'] = $row['config_value']; ! $user_dateformat = ( !empty($HTTP_POST_VARS['dateformat']) ) ? trim(htmlspecialchars($HTTP_POST_VARS['dateformat'])) : $board_config['default_dateformat']; ! ! $user_avatar_local = ( isset($HTTP_POST_VARS['avatarselect']) && !empty($HTTP_POST_VARS['submitavatar']) && $board_config['allow_avatar_local'] ) ? $HTTP_POST_VARS['avatarselect'] : ( ( isset($HTTP_POST_VARS['avatarlocal']) ) ? htmlspecialchars($HTTP_POST_VARS['avatarlocal']) : '' ); $user_avatar_remoteurl = ( !empty($HTTP_POST_VARS['avatarremoteurl']) ) ? trim(htmlspecialchars($HTTP_POST_VARS['avatarremoteurl'])) : ''; $user_avatar_upload = ( !empty($HTTP_POST_VARS['avatarurl']) ) ? trim($HTTP_POST_VARS['avatarurl']) : ( ( $HTTP_POST_FILES['avatar']['tmp_name'] != "none") ? $HTTP_POST_FILES['avatar']['tmp_name'] : '' ); *************** *** 178,186 **** { $username = stripslashes($username); $email = stripslashes($email); ! $cur_password = stripslashes($cur_password); ! $new_password = stripslashes($new_password); ! $password_confirm = stripslashes($password_confirm); $icq = stripslashes($icq); $aim = stripslashes($aim); --- 192,200 ---- { $username = stripslashes($username); $email = stripslashes($email); ! $cur_password = htmlspecialchars(stripslashes($cur_password)); ! $new_password = htmlspecialchars(stripslashes($new_password)); ! $password_confirm = htmlspecialchars(stripslashes($password_confirm)); $icq = stripslashes($icq); $aim = stripslashes($aim); *************** *** 200,211 **** { $user_avatar = $user_avatar_local; $user_avatar_type = USER_AVATAR_GALLERY; - - if ( $userdata['user_avatar_type'] == USER_AVATAR_UPLOAD && @file_exists('./' . $board_config['avatar_path'] . '/' . $userdata['user_avatar']) ) - { - @unlink('./' . $board_config['avatar_path'] . '/' . $userdata['user_avatar']); - } - } } } --- 214,219 ---- *************** *** 214,220 **** // and ensure that they were trying to register a second time // (Prevents double registrations) // ! if ( $userdata['session_logged_in'] && $mode =="register" && $username == $userdata['username']) { message_die(GENERAL_MESSAGE, $lang['Username_taken'], '', __LINE__, __FILE__); } --- 223,229 ---- // and ensure that they were trying to register a second time // (Prevents double registrations) // ! if ($mode == 'register' && ($userdata['session_logged_in'] || $username == $userdata['username'])) { message_die(GENERAL_MESSAGE, $lang['Username_taken'], '', __LINE__, __FILE__); } *************** *** 334,351 **** { if ( empty($username) ) { $error = TRUE; - $error_msg .= ( ( isset($error_msg) ) ? '
' : '' ) . $lang['Username_disallowed']; } else if ( $username != $userdata['username'] || $mode == 'register' ) { $result = validate_username($username); if ( $result['error'] ) { $error = TRUE; $error_msg .= ( ( isset($error_msg) ) ? '
' : '' ) . $result['error_msg']; } ! else { $username_sql = "username = '" . str_replace("\'", "''", $username) . "', "; } --- 341,362 ---- { if ( empty($username) ) { + // Error is already triggered, since one field is empty. $error = TRUE; } else if ( $username != $userdata['username'] || $mode == 'register' ) { + if (strtolower($username) != strtolower($userdata['username'])) + { $result = validate_username($username); if ( $result['error'] ) { $error = TRUE; $error_msg .= ( ( isset($error_msg) ) ? '
' : '' ) . $result['error_msg']; } ! } ! ! if (!$error) { $username_sql = "username = '" . str_replace("\'", "''", $username) . "', "; } *************** *** 372,382 **** rawurlencode($website); } if ( isset($HTTP_POST_VARS['avatardel']) && $mode == 'editprofile' ) { $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'] ) { if ( !empty($user_avatar_upload) ) { --- 383,396 ---- rawurlencode($website); } + $avatar_sql = ''; + if ( isset($HTTP_POST_VARS['avatardel']) && $mode == 'editprofile' ) { $avatar_sql = user_avatar_delete($userdata['user_avatar_type'], $userdata['user_avatar']); } ! ! if ( ( !empty($user_avatar_upload) || !empty($user_avatar_name) ) && $board_config['allow_avatar_upload'] ) { if ( !empty($user_avatar_upload) ) { *************** *** 393,407 **** } else if ( $user_avatar_remoteurl != '' && $board_config['allow_avatar_remote'] ) { $avatar_sql = user_avatar_url($mode, $error, $error_msg, $user_avatar_remoteurl); } else if ( $user_avatar_local != '' && $board_config['allow_avatar_local'] ) { ! $avatar_sql = user_avatar_gallery($mode, $error, $error_msg, $user_avatar_local); ! } ! else { ! $avatar_sql = ''; } if ( !$error ) --- 407,425 ---- } else if ( $user_avatar_remoteurl != '' && $board_config['allow_avatar_remote'] ) { + if ( @file_exists(@phpbb_realpath('./' . $board_config['avatar_path'] . '/' . $userdata['user_avatar'])) ) + { + @unlink(@phpbb_realpath('./' . $board_config['avatar_path'] . '/' . $userdata['user_avatar'])); + } $avatar_sql = user_avatar_url($mode, $error, $error_msg, $user_avatar_remoteurl); } else if ( $user_avatar_local != '' && $board_config['allow_avatar_local'] ) { ! if ( @file_exists(@phpbb_realpath('./' . $board_config['avatar_path'] . '/' . $userdata['user_avatar'])) ) { ! @unlink(@phpbb_realpath('./' . $board_config['avatar_path'] . '/' . $userdata['user_avatar'])); ! } ! $avatar_sql = user_avatar_gallery($mode, $error, $error_msg, $user_avatar_local); } if ( !$error ) *************** *** 434,440 **** } $sql = "UPDATE " . USERS_TABLE . " ! SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) ."', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_sig_bbcode_uid = '$signature_bbcode_uid', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_active = $user_active, user_actkey = '" . str_replace("\'", "''", $user_actkey) . "'" . $avatar_sql . " WHERE user_id = $user_id"; if ( !($result = $db->sql_query($sql)) ) { --- 452,458 ---- } $sql = "UPDATE " . USERS_TABLE . " ! SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) ."', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_sig_bbcode_uid = '$signature_bbcode_uid', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_notify_pm = $notifypm, user_popup_pm = $popup_pm, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_active = $user_active, user_actkey = '" . str_replace("\'", "''", $user_actkey) . "'" . $avatar_sql . " WHERE user_id = $user_id"; if ( !($result = $db->sql_query($sql)) ) { *************** *** 449,465 **** 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('user_activate', stripslashes($user_lang)); $emailer->email_address($email); ! $emailer->set_subject();//$lang['Reactivate'] ! $emailer->extra_headers($email_headers); $emailer->assign_vars(array( 'SITENAME' => $board_config['sitename'], ! 'USERNAME' => $username, ! 'EMAIL_SIG' => str_replace('
', "\n", "-- \n" . $board_config['board_email_sig']), 'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey) ); --- 467,483 ---- include($phpbb_root_path . 'includes/emailer.'.$phpEx); $emailer = new emailer($board_config['smtp_delivery']); ! $emailer->from($board_config['board_email']); ! $emailer->replyto($board_config['board_email']); $emailer->use_template('user_activate', stripslashes($user_lang)); $emailer->email_address($email); ! $emailer->set_subject($lang['Reactivate']); $emailer->assign_vars(array( 'SITENAME' => $board_config['sitename'], ! 'USERNAME' => preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, substr(str_replace("\'", "'", $username), 0, 25)), ! 'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('
', "\n", "-- \n" . $board_config['board_email_sig']) : '', 'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey) ); *************** *** 498,504 **** // 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) ! 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 ) { $user_actkey = gen_rand_string(true); --- 516,522 ---- // 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) ! 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, $popup_pm, $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 ) { $user_actkey = gen_rand_string(true); *************** *** 557,575 **** 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($email_template, stripslashes($user_lang)); $emailer->email_address($email); ! $emailer->set_subject();//sprintf($lang['Welcome_subject'], $board_config['sitename']) ! $emailer->extra_headers($email_headers); if( $coppa ) { $emailer->assign_vars(array( 'SITENAME' => $board_config['sitename'], 'WELCOME_MSG' => sprintf($lang['Welcome_subject'], $board_config['sitename']), ! 'USERNAME' => $username, 'PASSWORD' => $password_confirm, 'EMAIL_SIG' => str_replace('
', "\n", "-- \n" . $board_config['board_email_sig']), --- 575,593 ---- include($phpbb_root_path . 'includes/emailer.'.$phpEx); $emailer = new emailer($board_config['smtp_delivery']); ! $emailer->from($board_config['board_email']); ! $emailer->replyto($board_config['board_email']); $emailer->use_template($email_template, stripslashes($user_lang)); $emailer->email_address($email); ! $emailer->set_subject(sprintf($lang['Welcome_subject'], $board_config['sitename'])); if( $coppa ) { $emailer->assign_vars(array( 'SITENAME' => $board_config['sitename'], 'WELCOME_MSG' => sprintf($lang['Welcome_subject'], $board_config['sitename']), ! 'USERNAME' => preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, substr(str_replace("\'", "'", $username), 0, 25)), 'PASSWORD' => $password_confirm, 'EMAIL_SIG' => str_replace('
', "\n", "-- \n" . $board_config['board_email_sig']), *************** *** 591,597 **** $emailer->assign_vars(array( 'SITENAME' => $board_config['sitename'], 'WELCOME_MSG' => sprintf($lang['Welcome_subject'], $board_config['sitename']), ! 'USERNAME' => $username, 'PASSWORD' => $password_confirm, 'EMAIL_SIG' => str_replace('
', "\n", "-- \n" . $board_config['board_email_sig']), --- 609,615 ---- $emailer->assign_vars(array( 'SITENAME' => $board_config['sitename'], 'WELCOME_MSG' => sprintf($lang['Welcome_subject'], $board_config['sitename']), ! 'USERNAME' => preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, substr(str_replace("\'", "'", $username), 0, 25)), 'PASSWORD' => $password_confirm, 'EMAIL_SIG' => str_replace('
', "\n", "-- \n" . $board_config['board_email_sig']), *************** *** 604,617 **** if ( $board_config['require_activation'] == USER_ACTIVATION_ADMIN ) { ! //$emailer->use_template("admin_activate", stripslashes($user_lang)); ! $emailer->use_template("admin_activate", $board_config['default_lang']); ! $emailer->email_address($board_config['board_email']); ! $emailer->set_subject(); //$lang['New_account_subject'] ! $emailer->extra_headers($email_headers); $emailer->assign_vars(array( ! 'USERNAME' => $username, 'EMAIL_SIG' => str_replace('
', "\n", "-- \n" . $board_config['board_email_sig']), 'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey) --- 622,647 ---- if ( $board_config['require_activation'] == USER_ACTIVATION_ADMIN ) { ! $sql = "SELECT user_email, user_lang ! FROM " . USERS_TABLE . " ! WHERE user_level = " . ADMIN; ! ! if ( !($result = $db->sql_query($sql)) ) ! { ! message_die(GENERAL_ERROR, 'Could not select Administrators', '', __LINE__, __FILE__, $sql); ! } ! ! while ($row = $db->sql_fetchrow($result)) ! { ! $emailer->from($board_config['board_email']); ! $emailer->replyto($board_config['board_email']); ! ! $emailer->email_address(trim($row['user_email'])); ! $emailer->use_template("admin_activate", $row['user_lang']); ! $emailer->set_subject($lang['New_account_subject']); $emailer->assign_vars(array( ! 'USERNAME' => preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, substr(str_replace("\'", "'", $username), 0, 25)), 'EMAIL_SIG' => str_replace('
', "\n", "-- \n" . $board_config['board_email_sig']), 'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey) *************** *** 619,624 **** --- 649,656 ---- $emailer->send(); $emailer->reset(); } + $db->sql_freeresult($result); + } $message = $message . '

' . sprintf($lang['Click_return_index'], '', ''); *************** *** 639,654 **** $password_confirm = ''; $icq = stripslashes($icq); ! $aim = htmlspecialchars(str_replace('+', ' ', stripslashes($aim))); ! $msn = htmlspecialchars(stripslashes($msn)); ! $yim = htmlspecialchars(stripslashes($yim)); ! ! $website = htmlspecialchars(stripslashes($website)); ! $location = htmlspecialchars(stripslashes($location)); ! $occupation = htmlspecialchars(stripslashes($occupation)); ! $interests = htmlspecialchars(stripslashes($interests)); $signature = stripslashes($signature); ! $signature = ( $signature_bbcode_uid != '' ) ? preg_replace("/:(([a-z0-9]+:)?)$signature_bbcode_uid\]/si", ']', $signature) : $signature; $user_lang = stripslashes($user_lang); $user_dateformat = stripslashes($user_dateformat); --- 671,686 ---- $password_confirm = ''; $icq = stripslashes($icq); ! $aim = str_replace('+', ' ', stripslashes($aim)); ! $msn = stripslashes($msn); ! $yim = stripslashes($yim); ! ! $website = stripslashes($website); ! $location = stripslashes($location); ! $occupation = stripslashes($occupation); ! $interests = stripslashes($interests); $signature = stripslashes($signature); ! $signature = ($signature_bbcode_uid != '') ? preg_replace("/:(([a-z0-9]+:)?)$signature_bbcode_uid(=|\])/si", '\\3', $signature) : $signature; $user_lang = stripslashes($user_lang); $user_dateformat = stripslashes($user_dateformat); *************** *** 657,682 **** else if ( $mode == 'editprofile' && !isset($HTTP_POST_VARS['avatargallery']) && !isset($HTTP_POST_VARS['submitavatar']) && !isset($HTTP_POST_VARS['cancelavatar']) ) { $user_id = $userdata['user_id']; ! $username = htmlspecialchars($userdata['username']); $email = $userdata['user_email']; $new_password = ''; $password_confirm = ''; $icq = $userdata['user_icq']; ! $aim = htmlspecialchars(str_replace('+', ' ', $userdata['user_aim'])); ! $msn = htmlspecialchars($userdata['user_msnm']); ! $yim = htmlspecialchars($userdata['user_yim']); ! ! $website = htmlspecialchars($userdata['user_website']); ! $location = htmlspecialchars($userdata['user_from']); ! $occupation = htmlspecialchars($userdata['user_occ']); ! $interests = htmlspecialchars($userdata['user_interests']); $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']; $viewemail = $userdata['user_viewemail']; $notifypm = $userdata['user_notify_pm']; ! $popuppm = $userdata['user_popup_pm']; $notifyreply = $userdata['user_notify']; $attachsig = $userdata['user_attachsig']; $allowhtml = $userdata['user_allowhtml']; --- 689,714 ---- else if ( $mode == 'editprofile' && !isset($HTTP_POST_VARS['avatargallery']) && !isset($HTTP_POST_VARS['submitavatar']) && !isset($HTTP_POST_VARS['cancelavatar']) ) { $user_id = $userdata['user_id']; ! $username = $userdata['username']; $email = $userdata['user_email']; $new_password = ''; $password_confirm = ''; $icq = $userdata['user_icq']; ! $aim = str_replace('+', ' ', $userdata['user_aim']); ! $msn = $userdata['user_msnm']; ! $yim = $userdata['user_yim']; ! ! $website = $userdata['user_website']; ! $location = $userdata['user_from']; ! $occupation = $userdata['user_occ']; ! $interests = $userdata['user_interests']; $signature_bbcode_uid = $userdata['user_sig_bbcode_uid']; ! $signature = ($signature_bbcode_uid != '') ? preg_replace("/:(([a-z0-9]+:)?)$signature_bbcode_uid(=|\])/si", '\\3', $userdata['user_sig']) : $userdata['user_sig']; $viewemail = $userdata['user_viewemail']; $notifypm = $userdata['user_notify_pm']; ! $popup_pm = $userdata['user_popup_pm']; $notifyreply = $userdata['user_notify']; $attachsig = $userdata['user_attachsig']; $allowhtml = $userdata['user_allowhtml']; *************** *** 721,727 **** $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 { --- 753,759 ---- $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, $popup_pm, $notifyreply, $attachsig, $allowhtml, $allowbbcode, $allowsmilies, $allowviewonline, $user_style, $user_lang, $user_timezone, $user_dateformat, $userdata['session_id']); } else { *************** *** 794,799 **** --- 826,840 ---- $template->assign_block_vars('switch_edit_profile', array()); } + if ( ($mode == 'register') || ($board_config['allow_namechange']) ) + { + $template->assign_block_vars('switch_namechange_allowed', array()); + } + else + { + $template->assign_block_vars('switch_namechange_disallowed', array()); + } + // // Let's do an overall check for settings/versions which would prevent // us from doing file uploads.... *************** *** 822,829 **** 'HIDE_USER_NO' => ( $allowviewonline ) ? 'checked="checked"' : '', 'NOTIFY_PM_YES' => ( $notifypm ) ? 'checked="checked"' : '', 'NOTIFY_PM_NO' => ( !$notifypm ) ? 'checked="checked"' : '', ! 'POPUP_PM_YES' => ( $popuppm ) ? 'checked="checked"' : '', ! 'POPUP_PM_NO' => ( !$popuppm ) ? 'checked="checked"' : '', 'ALWAYS_ADD_SIGNATURE_YES' => ( $attachsig ) ? 'checked="checked"' : '', 'ALWAYS_ADD_SIGNATURE_NO' => ( !$attachsig ) ? 'checked="checked"' : '', 'NOTIFY_REPLY_YES' => ( $notifyreply ) ? 'checked="checked"' : '', --- 863,870 ---- 'HIDE_USER_NO' => ( $allowviewonline ) ? 'checked="checked"' : '', 'NOTIFY_PM_YES' => ( $notifypm ) ? 'checked="checked"' : '', 'NOTIFY_PM_NO' => ( !$notifypm ) ? 'checked="checked"' : '', ! 'POPUP_PM_YES' => ( $popup_pm ) ? 'checked="checked"' : '', ! 'POPUP_PM_NO' => ( !$popup_pm ) ? 'checked="checked"' : '', 'ALWAYS_ADD_SIGNATURE_YES' => ( $attachsig ) ? 'checked="checked"' : '', 'ALWAYS_ADD_SIGNATURE_NO' => ( !$attachsig ) ? 'checked="checked"' : '', 'NOTIFY_REPLY_YES' => ( $notifyreply ) ? 'checked="checked"' : '', *************** *** 920,926 **** { $template->assign_block_vars('switch_avatar_block', array() ); ! if ( $board_config['allow_avatar_upload'] && file_exists('./' . $board_config['avatar_path']) ) { if ( $form_enctype != '' ) { --- 961,967 ---- { $template->assign_block_vars('switch_avatar_block', array() ); ! if ( $board_config['allow_avatar_upload'] && file_exists(@phpbb_realpath('./' . $board_config['avatar_path'])) ) { if ( $form_enctype != '' ) { *************** *** 934,940 **** $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']) ) { $template->assign_block_vars('switch_avatar_block.switch_avatar_local_gallery', array() ); } --- 975,981 ---- $template->assign_block_vars('switch_avatar_block.switch_avatar_remote_link', array() ); } ! if ( $board_config['allow_avatar_local'] && file_exists(@phpbb_realpath('./' . $board_config['avatar_gallery_path'])) ) { $template->assign_block_vars('switch_avatar_block.switch_avatar_local_gallery', array() ); } diff -crbB phpbb203/includes/usercp_sendpasswd.php phpbb206/includes/usercp_sendpasswd.php *** phpbb203/includes/usercp_sendpasswd.php Sun Jun 15 14:32:15 2003 --- phpbb206/includes/usercp_sendpasswd.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: usercp_sendpasswd.php,v 1.6.2.4 2002/05/20 00:21:38 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: usercp_sendpasswd.php,v 1.6.2.11 2003/05/03 23:24:03 acydburn Exp $ * * ***************************************************************************/ *************** *** 65,82 **** 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('user_activate_passwd', $row['user_lang']); $emailer->email_address($row['user_email']); ! $emailer->set_subject();//$lang['New_password_activation'] ! $emailer->extra_headers($email_headers); $emailer->assign_vars(array( 'SITENAME' => $board_config['sitename'], 'USERNAME' => $username, 'PASSWORD' => $user_password, ! 'EMAIL_SIG' => str_replace('
', "\n", "-- \n" . $board_config['board_email_sig']), 'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey) ); --- 65,82 ---- include($phpbb_root_path . 'includes/emailer.'.$phpEx); $emailer = new emailer($board_config['smtp_delivery']); ! $emailer->from($board_config['board_email']); ! $emailer->replyto($board_config['board_email']); $emailer->use_template('user_activate_passwd', $row['user_lang']); $emailer->email_address($row['user_email']); ! $emailer->set_subject($lang['New_password_activation']); $emailer->assign_vars(array( 'SITENAME' => $board_config['sitename'], 'USERNAME' => $username, 'PASSWORD' => $user_password, ! 'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('
', "\n", "-- \n" . $board_config['board_email_sig']) : '', 'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey) ); *************** *** 127,132 **** --- 127,133 ---- 'L_SUBMIT' => $lang['Submit'], 'L_RESET' => $lang['Reset'], + 'S_HIDDEN_FIELDS' => '', 'S_PROFILE_ACTION' => append_sid("profile.$phpEx?mode=sendpassword")) ); diff -crbB phpbb203/includes/usercp_viewprofile.php phpbb206/includes/usercp_viewprofile.php *** phpbb203/includes/usercp_viewprofile.php Sun Jun 15 14:32:15 2003 --- phpbb206/includes/usercp_viewprofile.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: usercp_viewprofile.php,v 1.5 2002/03/31 00:06:34 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: usercp_viewprofile.php,v 1.5.2.1 2003/02/25 23:28:30 acydburn Exp $ * * ***************************************************************************/ *************** *** 31,37 **** { message_die(GENERAL_MESSAGE, $lang['No_user_id_specified']); } ! $profiledata = get_userdata(intval($HTTP_GET_VARS[POST_USERS_URL])); $sql = "SELECT * FROM " . RANKS_TABLE . " --- 31,37 ---- { message_die(GENERAL_MESSAGE, $lang['No_user_id_specified']); } ! $profiledata = get_userdata($HTTP_GET_VARS[POST_USERS_URL]); $sql = "SELECT * FROM " . RANKS_TABLE . " diff -crbB phpbb203/index.php phpbb206/index.php *** phpbb203/index.php Sun Jun 15 14:32:15 2003 --- phpbb206/index.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: index.php,v 1.99 2002/03/31 13:58:01 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: index.php,v 1.99.2.1 2002/12/19 17:17:40 psotfx Exp $ * * ***************************************************************************/ *************** *** 251,256 **** --- 251,257 ---- // // Start output of page // + define('SHOW_ONLINE', true); $page_title = $lang['Index']; include($phpbb_root_path . 'includes/page_header.'.$phpEx); diff -crbB phpbb203/language/lang_english/email/coppa_welcome_inactive.tpl phpbb206/language/lang_english/email/coppa_welcome_inactive.tpl *** phpbb203/language/lang_english/email/coppa_welcome_inactive.tpl Sun Jun 15 14:32:16 2003 --- phpbb206/language/lang_english/email/coppa_welcome_inactive.tpl Sun Jul 20 16:37:22 2003 *************** *** 44,50 **** ------------------------------ CUT HERE ------------------------------ ! Once the administrator has recived the above form via fax or regular mail your account will be activated. Please do not forget your password as it has been encrypted in our database and we cannot retrieve it for you. However, should you forget your password you can request a new one which will be activated in the same way as this account. --- 44,50 ---- ------------------------------ CUT HERE ------------------------------ ! Once the administrator has received the above form via fax or regular mail your account will be activated. Please do not forget your password as it has been encrypted in our database and we cannot retrieve it for you. However, should you forget your password you can request a new one which will be activated in the same way as this account. diff -crbB phpbb203/language/lang_english/lang_admin.php phpbb206/language/lang_english/lang_admin.php *** phpbb203/language/lang_english/lang_admin.php Sun Jun 15 14:32:16 2003 --- phpbb206/language/lang_english/lang_admin.php Sun Jul 20 16:37:23 2003 *************** *** 7,13 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: lang_admin.php,v 1.35.2.3 2002/06/27 20:06:44 thefinn Exp $ * ****************************************************************************/ --- 7,13 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: lang_admin.php,v 1.35.2.9 2003/06/10 00:31:19 psotfx Exp $ * ****************************************************************************/ *************** *** 20,25 **** --- 20,30 ---- * ***************************************************************************/ + /* CONTRIBUTORS + 2002-12-15 Philip M. White (pwhite@mailhaven.com) + Fixed many minor grammatical mistakes + */ + // // Format is same as lang_main // *************** *** 57,63 **** $lang['Admin'] = 'Administration'; $lang['Not_admin'] = 'You are not authorised to administer this board'; $lang['Welcome_phpBB'] = 'Welcome to phpBB'; ! $lang['Admin_intro'] = 'Thank you for choosing phpBB as your forum solution. This screen will give you a quick overview of all the various statistics of your board. You can get back to this page by clicking on the Admin Index link in the left pane. To return to the index of your board, click the phpBB logo also in the left pane. The other links on the left hand side of this screen will allow you to control every aspect of your forum experience, each screen will have instructions on how to use the tools.'; $lang['Main_index'] = 'Forum Index'; $lang['Forum_stats'] = 'Forum Statistics'; $lang['Admin_Index'] = 'Admin Index'; --- 62,68 ---- $lang['Admin'] = 'Administration'; $lang['Not_admin'] = 'You are not authorised to administer this board'; $lang['Welcome_phpBB'] = 'Welcome to phpBB'; ! $lang['Admin_intro'] = 'Thank you for choosing phpBB as your forum solution. This screen will give you a quick overview of all the various statistics of your board. You can get back to this page by clicking on the Admin Index link in the left pane. To return to the index of your board, click the phpBB logo also in the left pane. The other links on the left hand side of this screen will allow you to control every aspect of your forum experience. Each screen will have instructions on how to use the tools.'; $lang['Main_index'] = 'Forum Index'; $lang['Forum_stats'] = 'Forum Statistics'; $lang['Admin_Index'] = 'Admin Index'; *************** *** 90,102 **** $lang['Restore'] = 'Restore'; $lang['Backup'] = 'Backup'; ! $lang['Restore_explain'] = 'This will perform a full restore of all phpBB tables from a saved file. If your server supports it you may upload a gzip compressed text file and it will automatically be decompressed. WARNING This will overwrite any existing data. The restore may take a long time to process please do not move from this page till it is complete.'; ! $lang['Backup_explain'] = 'Here you can backup all your phpBB related data. If you have any additional custom tables in the same database with phpBB that you would like to back up as well please enter their names separated by commas in the Additional Tables textbox below. If your server supports it you may also gzip compress the file to reduce its size before download.'; $lang['Backup_options'] = 'Backup options'; $lang['Start_backup'] = 'Start Backup'; $lang['Full_backup'] = 'Full backup'; ! $lang['Structure_backup'] = 'Structure Only backup'; $lang['Data_backup'] = 'Data only backup'; $lang['Additional_tables'] = 'Additional tables'; $lang['Gzip_compress'] = 'Gzip compress file'; --- 95,107 ---- $lang['Restore'] = 'Restore'; $lang['Backup'] = 'Backup'; ! $lang['Restore_explain'] = 'This will perform a full restore of all phpBB tables from a saved file. If your server supports it, you may upload a gzip-compressed text file and it will automatically be decompressed. WARNING: This will overwrite any existing data. The restore may take a long time to process, so please do not move from this page until it is complete.'; ! $lang['Backup_explain'] = 'Here you can back up all your phpBB-related data. If you have any additional custom tables in the same database with phpBB that you would like to back up as well, please enter their names, separated by commas, in the Additional Tables textbox below. If your server supports it you may also gzip-compress the file to reduce its size before download.'; $lang['Backup_options'] = 'Backup options'; $lang['Start_backup'] = 'Start Backup'; $lang['Full_backup'] = 'Full backup'; ! $lang['Structure_backup'] = 'Structure-Only backup'; $lang['Data_backup'] = 'Data only backup'; $lang['Additional_tables'] = 'Additional tables'; $lang['Gzip_compress'] = 'Gzip compress file'; *************** *** 104,115 **** $lang['Start_Restore'] = 'Start Restore'; $lang['Restore_success'] = 'The Database has been successfully restored.

Your board should be back to the state it was when the backup was made.'; ! $lang['Backup_download'] = 'Your download will start shortly please wait till it begins'; ! $lang['Backups_not_supported'] = 'Sorry but database backups are not currently supported for your database system'; $lang['Restore_Error_uploading'] = 'Error in uploading the backup file'; ! $lang['Restore_Error_filename'] = 'Filename problem, please try an alternative file'; ! $lang['Restore_Error_decompress'] = 'Cannot decompress a gzip file, please upload a plain text version'; $lang['Restore_Error_no_file'] = 'No file was uploaded'; --- 109,120 ---- $lang['Start_Restore'] = 'Start Restore'; $lang['Restore_success'] = 'The Database has been successfully restored.

Your board should be back to the state it was when the backup was made.'; ! $lang['Backup_download'] = 'Your download will start shortly; please wait until it begins.'; ! $lang['Backups_not_supported'] = 'Sorry, but database backups are not currently supported for your database system.'; $lang['Restore_Error_uploading'] = 'Error in uploading the backup file'; ! $lang['Restore_Error_filename'] = 'Filename problem; please try an alternative file'; ! $lang['Restore_Error_decompress'] = 'Cannot decompress a gzip file; please upload a plain text version'; $lang['Restore_Error_no_file'] = 'No file was uploaded'; *************** *** 128,134 **** $lang['Group_auth_explain'] = 'Here you can alter the permissions and moderator status assigned to each user group. Do not forget when changing group permissions that individual user permissions may still allow the user entry to forums, etc. You will be warned if this is the case.'; $lang['User_auth_explain'] = 'Here you can alter the permissions and moderator status assigned to each individual user. Do not forget when changing user permissions that group permissions may still allow the user entry to forums, etc. You will be warned if this is the case.'; ! $lang['Forum_auth_explain'] = 'Here you can alter the authorisation levels of each forum. You will have both a simple and advanced method for doing this, advanced offers greater control of each forum operation. Remember that changing the permission level of forums will affect which users can carry out the various operations within them.'; $lang['Simple_mode'] = 'Simple Mode'; $lang['Advanced_mode'] = 'Advanced Mode'; --- 133,139 ---- $lang['Group_auth_explain'] = 'Here you can alter the permissions and moderator status assigned to each user group. Do not forget when changing group permissions that individual user permissions may still allow the user entry to forums, etc. You will be warned if this is the case.'; $lang['User_auth_explain'] = 'Here you can alter the permissions and moderator status assigned to each individual user. Do not forget when changing user permissions that group permissions may still allow the user entry to forums, etc. You will be warned if this is the case.'; ! $lang['Forum_auth_explain'] = 'Here you can alter the authorisation levels of each forum. You will have both a simple and advanced method for doing this, where advanced offers greater control of each forum operation. Remember that changing the permission level of forums will affect which users can carry out the various operations within them.'; $lang['Simple_mode'] = 'Simple Mode'; $lang['Advanced_mode'] = 'Advanced Mode'; *************** *** 172,178 **** $lang['Pollcreate'] = 'Poll create'; $lang['Permissions'] = 'Permissions'; ! $lang['Simple_Permission'] = 'Simple Permission'; $lang['User_Level'] = 'User Level'; $lang['Auth_User'] = 'User'; --- 177,183 ---- $lang['Pollcreate'] = 'Poll create'; $lang['Permissions'] = 'Permissions'; ! $lang['Simple_Permission'] = 'Simple Permissions'; $lang['User_Level'] = 'User Level'; $lang['Auth_User'] = 'User'; *************** *** 194,204 **** // Banning // $lang['Ban_control'] = 'Ban Control'; ! $lang['Ban_explain'] = 'Here you can control the banning of users. You can achieve this by banning either or both of a specific user or an individual or range of IP addresses or hostnames. These methods prevent a user from even reaching the index page of your board. To prevent a user from registering under a different username you can also specify a banned email address. Please note that banning an email address alone will not prevent that user from being able to logon or post to your board, you should use one of the first two methods to achieve this.'; ! $lang['Ban_explain_warn'] = 'Please note that entering a range of IP addresses results in all the addresses between the start and end being added to the banlist. Attempts will be made to minimise the number of addresses added to the database by introducing wildcards automatically where appropriate. If you really must enter a range try to keep it small or better yet state specific addresses.'; $lang['Select_username'] = 'Select a Username'; ! $lang['Select_ip'] = 'Select an IP'; $lang['Select_email'] = 'Select an Email address'; $lang['Ban_username'] = 'Ban one or more specific users'; --- 199,209 ---- // Banning // $lang['Ban_control'] = 'Ban Control'; ! $lang['Ban_explain'] = 'Here you can control the banning of users. You can achieve this by banning either or both of a specific user or an individual or range of IP addresses or hostnames. These methods prevent a user from even reaching the index page of your board. To prevent a user from registering under a different username you can also specify a banned email address. Please note that banning an email address alone will not prevent that user from being able to log on or post to your board. You should use one of the first two methods to achieve this.'; ! $lang['Ban_explain_warn'] = 'Please note that entering a range of IP addresses results in all the addresses between the start and end being added to the banlist. Attempts will be made to minimise the number of addresses added to the database by introducing wildcards automatically where appropriate. If you really must enter a range, try to keep it small or better yet state specific addresses.'; $lang['Select_username'] = 'Select a Username'; ! $lang['Select_ip'] = 'Select an IP address'; $lang['Select_email'] = 'Select an Email address'; $lang['Ban_username'] = 'Ban one or more specific users'; *************** *** 206,215 **** $lang['Ban_IP'] = 'Ban one or more IP addresses or hostnames'; $lang['IP_hostname'] = 'IP addresses or hostnames'; ! $lang['Ban_IP_explain'] = 'To specify several different IP\'s or hostnames separate them with commas. To specify a range of IP addresses separate the start and end with a hyphen (-), to specify a wildcard use *'; $lang['Ban_email'] = 'Ban one or more email addresses'; ! $lang['Ban_email_explain'] = 'To specify more than one email address separate them with commas. To specify a wildcard username use *, for example *@hotmail.com'; $lang['Unban_username'] = 'Un-ban one more specific users'; $lang['Unban_username_explain'] = 'You can unban multiple users in one go using the appropriate combination of mouse and keyboard for your computer and browser'; --- 211,220 ---- $lang['Ban_IP'] = 'Ban one or more IP addresses or hostnames'; $lang['IP_hostname'] = 'IP addresses or hostnames'; ! $lang['Ban_IP_explain'] = 'To specify several different IP addresses or hostnames separate them with commas. To specify a range of IP addresses, separate the start and end with a hyphen (-); to specify a wildcard, use an asterisk (*).'; $lang['Ban_email'] = 'Ban one or more email addresses'; ! $lang['Ban_email_explain'] = 'To specify more than one email address, separate them with commas. To specify a wildcard username, use * like *@hotmail.com'; $lang['Unban_username'] = 'Un-ban one more specific users'; $lang['Unban_username_explain'] = 'You can unban multiple users in one go using the appropriate combination of mouse and keyboard for your computer and browser'; *************** *** 238,252 **** $lang['General_settings'] = 'General Board Settings'; $lang['Server_name'] = 'Domain Name'; ! $lang['Server_name_explain'] = 'The domain name this board runs from'; $lang['Script_path'] = 'Script path'; $lang['Script_path_explain'] = 'The path where phpBB2 is located relative to the domain name'; $lang['Server_port'] = 'Server Port'; ! $lang['Server_port_explain'] = 'The port your server is running on, usually 80, only change if different'; $lang['Site_name'] = 'Site name'; $lang['Site_desc'] = 'Site description'; $lang['Board_disable'] = 'Disable board'; ! $lang['Board_disable_explain'] = 'This will make the board unavailable to users. Do not logout when you disable the board, you will not be able to log back in!'; $lang['Acct_activation'] = 'Enable account activation'; $lang['Acc_None'] = 'None'; // These three entries are the type of activation $lang['Acc_User'] = 'User'; --- 243,257 ---- $lang['General_settings'] = 'General Board Settings'; $lang['Server_name'] = 'Domain Name'; ! $lang['Server_name_explain'] = 'The domain name from which this board runs'; $lang['Script_path'] = 'Script path'; $lang['Script_path_explain'] = 'The path where phpBB2 is located relative to the domain name'; $lang['Server_port'] = 'Server Port'; ! $lang['Server_port_explain'] = 'The port your server is running on, usually 80. Only change if different'; $lang['Site_name'] = 'Site name'; $lang['Site_desc'] = 'Site description'; $lang['Board_disable'] = 'Disable board'; ! $lang['Board_disable_explain'] = 'This will make the board unavailable to users. Administrators are able to access the Administration Panel while the board is disabled.'; $lang['Acct_activation'] = 'Enable account activation'; $lang['Acc_None'] = 'None'; // These three entries are the type of activation $lang['Acc_User'] = 'User'; *************** *** 298,304 **** $lang['COPPA_settings'] = 'COPPA Settings'; $lang['COPPA_fax'] = 'COPPA Fax Number'; $lang['COPPA_mail'] = 'COPPA Mailing Address'; ! $lang['COPPA_mail_explain'] = 'This is the mailing address where parents will send COPPA registration forms'; $lang['Email_settings'] = 'Email Settings'; $lang['Admin_email'] = 'Admin Email Address'; --- 303,309 ---- $lang['COPPA_settings'] = 'COPPA Settings'; $lang['COPPA_fax'] = 'COPPA Fax Number'; $lang['COPPA_mail'] = 'COPPA Mailing Address'; ! $lang['COPPA_mail_explain'] = 'This is the mailing address to which parents will send COPPA registration forms'; $lang['Email_settings'] = 'Email Settings'; $lang['Admin_email'] = 'Admin Email Address'; *************** *** 308,316 **** $lang['Use_SMTP_explain'] = 'Say yes if you want or have to send email via a named server instead of the local mail function'; $lang['SMTP_server'] = 'SMTP Server Address'; $lang['SMTP_username'] = 'SMTP Username'; ! $lang['SMTP_username_explain'] = 'Only enter a username if your smtp server requires it'; $lang['SMTP_password'] = 'SMTP Password'; ! $lang['SMTP_password_explain'] = 'Only enter a password if your smtp server requires it'; $lang['Disable_privmsg'] = 'Private Messaging'; $lang['Inbox_limits'] = 'Max posts in Inbox'; --- 313,321 ---- $lang['Use_SMTP_explain'] = 'Say yes if you want or have to send email via a named server instead of the local mail function'; $lang['SMTP_server'] = 'SMTP Server Address'; $lang['SMTP_username'] = 'SMTP Username'; ! $lang['SMTP_username_explain'] = 'Only enter a username if your SMTP server requires it'; $lang['SMTP_password'] = 'SMTP Password'; ! $lang['SMTP_password_explain'] = 'Only enter a password if your SMTP server requires it'; $lang['Disable_privmsg'] = 'Private Messaging'; $lang['Inbox_limits'] = 'Max posts in Inbox'; *************** *** 318,331 **** $lang['Savebox_limits'] = 'Max posts in Savebox'; $lang['Cookie_settings'] = 'Cookie settings'; ! $lang['Cookie_settings_explain'] = 'These details define how cookies are sent to your users browsers. In most cases the default values for the cookie settings should be sufficient but if you need to change them do so with care, incorrect settings can prevent users logging in'; $lang['Cookie_domain'] = 'Cookie domain'; $lang['Cookie_name'] = 'Cookie name'; $lang['Cookie_path'] = 'Cookie path'; $lang['Cookie_secure'] = 'Cookie secure'; ! $lang['Cookie_secure_explain'] = 'If your server is running via SSL set this to enabled else leave as disabled'; $lang['Session_length'] = 'Session length [ seconds ]'; // // Forum Management --- 323,339 ---- $lang['Savebox_limits'] = 'Max posts in Savebox'; $lang['Cookie_settings'] = 'Cookie settings'; ! $lang['Cookie_settings_explain'] = 'These details define how cookies are sent to your users\' browsers. In most cases the default values for the cookie settings should be sufficient, but if you need to change them do so with care -- incorrect settings can prevent users from logging in'; $lang['Cookie_domain'] = 'Cookie domain'; $lang['Cookie_name'] = 'Cookie name'; $lang['Cookie_path'] = 'Cookie path'; $lang['Cookie_secure'] = 'Cookie secure'; ! $lang['Cookie_secure_explain'] = 'If your server is running via SSL, set this to enabled, else leave as disabled'; $lang['Session_length'] = 'Session length [ seconds ]'; + // Visual Confirmation + $lang['Visual_confirm'] = 'Enable Visual Confirmation'; + $lang['Visual_confirm_explain'] = 'Requires users enter a code defined by an image when registering.'; // // Forum Management *************** *** 361,375 **** $lang['prune_freq'] = 'Check for topic age every'; $lang['prune_days'] = 'Remove topics that have not been posted to in'; ! $lang['Set_prune_data'] = 'You have turned on auto-prune for this forum but did not set a frequency or number of days to prune. Please go back and do so'; $lang['Move_and_Delete'] = 'Move and Delete'; $lang['Delete_all_posts'] = 'Delete all posts'; ! $lang['Nowhere_to_move'] = 'Nowhere to move too'; $lang['Edit_Category'] = 'Edit Category'; ! $lang['Edit_Category_explain'] = 'Use this form to modify a categories name.'; $lang['Forums_updated'] = 'Forum and Category information updated successfully'; --- 369,383 ---- $lang['prune_freq'] = 'Check for topic age every'; $lang['prune_days'] = 'Remove topics that have not been posted to in'; ! $lang['Set_prune_data'] = 'You have turned on auto-prune for this forum but did not set a frequency or number of days to prune. Please go back and do so.'; $lang['Move_and_Delete'] = 'Move and Delete'; $lang['Delete_all_posts'] = 'Delete all posts'; ! $lang['Nowhere_to_move'] = 'Nowhere to move to'; $lang['Edit_Category'] = 'Edit Category'; ! $lang['Edit_Category_explain'] = 'Use this form to modify a category\'s name.'; $lang['Forums_updated'] = 'Forum and Category information updated successfully'; *************** *** 382,388 **** // Smiley Management // $lang['smiley_title'] = 'Smiles Editing Utility'; ! $lang['smile_desc'] = 'From this page you can add, remove and edit the emoticons or smileys your users can use in their posts and private messages.'; $lang['smiley_config'] = 'Smiley Configuration'; $lang['smiley_code'] = 'Smiley Code'; --- 390,396 ---- // Smiley Management // $lang['smiley_title'] = 'Smiles Editing Utility'; ! $lang['smile_desc'] = 'From this page you can add, remove and edit the emoticons or smileys that your users can use in their posts and private messages.'; $lang['smiley_config'] = 'Smiley Configuration'; $lang['smiley_code'] = 'Smiley Code'; *************** *** 416,431 **** // User Management // $lang['User_admin'] = 'User Administration'; ! $lang['User_admin_explain'] = 'Here you can change your user\'s information and certain specific options. To modify the users permissions please use the user and group permissions system.'; $lang['Look_up_user'] = 'Look up user'; ! $lang['Admin_user_fail'] = 'Couldn\'t update the users profile.'; $lang['Admin_user_updated'] = 'The user\'s profile was successfully updated.'; $lang['Click_return_useradmin'] = 'Click %sHere%s to return to User Administration'; $lang['User_delete'] = 'Delete this user'; ! $lang['User_delete_explain'] = 'Click here to delete this user, this cannot be undone.'; $lang['User_deleted'] = 'User was successfully deleted.'; $lang['User_status'] = 'User is active'; --- 424,439 ---- // User Management // $lang['User_admin'] = 'User Administration'; ! $lang['User_admin_explain'] = 'Here you can change your users\' information and certain options. To modify the users\' permissions, please use the user and group permissions system.'; $lang['Look_up_user'] = 'Look up user'; ! $lang['Admin_user_fail'] = 'Couldn\'t update the user\'s profile.'; $lang['Admin_user_updated'] = 'The user\'s profile was successfully updated.'; $lang['Click_return_useradmin'] = 'Click %sHere%s to return to User Administration'; $lang['User_delete'] = 'Delete this user'; ! $lang['User_delete_explain'] = 'Click here to delete this user; this cannot be undone.'; $lang['User_deleted'] = 'User was successfully deleted.'; $lang['User_status'] = 'User is active'; *************** *** 442,448 **** // Group Management // $lang['Group_administration'] = 'Group Administration'; ! $lang['Group_admin_explain'] = 'From this panel you can administer all your usergroups, you can; delete, create and edit existing groups. You may choose moderators, toggle open/closed group status and set the group name and description'; $lang['Error_updating_groups'] = 'There was an error while updating the groups'; $lang['Updated_group'] = 'The group was successfully updated'; $lang['Added_new_group'] = 'The new group was successfully created'; --- 450,456 ---- // Group Management // $lang['Group_administration'] = 'Group Administration'; ! $lang['Group_admin_explain'] = 'From this panel you can administer all your usergroups. You can delete, create and edit existing groups. You may choose moderators, toggle open/closed group status and set the group name and description'; $lang['Error_updating_groups'] = 'There was an error while updating the groups'; $lang['Updated_group'] = 'The group was successfully updated'; $lang['Added_new_group'] = 'The new group was successfully created'; *************** *** 475,481 **** // Prune Administration // $lang['Forum_Prune'] = 'Forum Prune'; ! $lang['Forum_Prune_explain'] = 'This will delete any topic which has not been posted to within the number of days you select. If you do not enter a number then all topics will be deleted. It will not remove topics in which polls are still running nor will it remove announcements. You will need to remove these topics manually.'; $lang['Do_Prune'] = 'Do Prune'; $lang['All_Forums'] = 'All Forums'; $lang['Prune_topics_not_posted'] = 'Prune topics with no replies in this many days'; --- 483,489 ---- // Prune Administration // $lang['Forum_Prune'] = 'Forum Prune'; ! $lang['Forum_Prune_explain'] = 'This will delete any topic which has not been posted to within the number of days you select. If you do not enter a number then all topics will be deleted. It will not remove topics in which polls are still running nor will it remove announcements. You will need to remove those topics manually.'; $lang['Do_Prune'] = 'Do Prune'; $lang['All_Forums'] = 'All Forums'; $lang['Prune_topics_not_posted'] = 'Prune topics with no replies in this many days'; *************** *** 488,494 **** // Word censor // $lang['Words_title'] = 'Word Censoring'; ! $lang['Words_explain'] = 'From this control panel you can add, edit, and remove words that will be automatically censored on your forums. In addition people will not be allowed to register with usernames containing these words. Wildcards (*) are accepted in the word field, eg. *test* will match detestable, test* would match testing, *test would match detest.'; $lang['Word'] = 'Word'; $lang['Edit_word_censor'] = 'Edit word censor'; $lang['Replacement'] = 'Replacement'; --- 496,502 ---- // Word censor // $lang['Words_title'] = 'Word Censoring'; ! $lang['Words_explain'] = 'From this control panel you can add, edit, and remove words that will be automatically censored on your forums. In addition people will not be allowed to register with usernames containing these words. Wildcards (*) are accepted in the word field. For example, *test* will match detestable, test* would match testing, *test would match detest.'; $lang['Word'] = 'Word'; $lang['Edit_word_censor'] = 'Edit word censor'; $lang['Replacement'] = 'Replacement'; *************** *** 508,514 **** // // Mass Email // ! $lang['Mass_email_explain'] = 'Here you can email a message to either all of your users, or all users of a specific group. To do this, an email will be sent out to the administrative email address supplied, with a blind carbon copy sent to all recipients. If you are emailing a large group of people please be patient after submitting and do not stop the page halfway through. It is normal for a mass emailing to take a long time, you will be notified when the script has completed'; $lang['Compose'] = 'Compose'; $lang['Recipients'] = 'Recipients'; --- 516,522 ---- // // Mass Email // ! $lang['Mass_email_explain'] = 'Here you can email a message to either all of your users or all users of a specific group. To do this, an email will be sent out to the administrative email address supplied, with a blind carbon copy sent to all recipients. If you are emailing a large group of people please be patient after submitting and do not stop the page halfway through. It is normal for a mass emailing to take a long time and you will be notified when the script has completed'; $lang['Compose'] = 'Compose'; $lang['Recipients'] = 'Recipients'; *************** *** 539,545 **** $lang['Rank_updated'] = 'The rank was successfully updated'; $lang['Rank_added'] = 'The rank was successfully added'; $lang['Rank_removed'] = 'The rank was successfully deleted'; ! $lang['No_update_ranks'] = 'The rank was successfully deleted, however, user accounts using this rank were not updated. You will need to manually reset the rank on these accounts'; $lang['Click_return_rankadmin'] = 'Click %sHere%s to return to Rank Administration'; --- 547,553 ---- $lang['Rank_updated'] = 'The rank was successfully updated'; $lang['Rank_added'] = 'The rank was successfully added'; $lang['Rank_removed'] = 'The rank was successfully deleted'; ! $lang['No_update_ranks'] = 'The rank was successfully deleted. However, user accounts using this rank were not updated. You will need to manually reset the rank on these accounts'; $lang['Click_return_rankadmin'] = 'Click %sHere%s to return to Rank Administration'; *************** *** 548,554 **** // Disallow Username Admin // $lang['Disallow_control'] = 'Username Disallow Control'; ! $lang['Disallow_explain'] = 'Here you can control usernames which will not be allowed to be used. Disallowed usernames are allowed to contain a wildcard character of *. Please note that you will not be allowed to specify any username that has already been registered, you must first delete that name then disallow it'; $lang['Delete_disallow'] = 'Delete'; $lang['Delete_disallow_title'] = 'Remove a Disallowed Username'; --- 556,562 ---- // Disallow Username Admin // $lang['Disallow_control'] = 'Username Disallow Control'; ! $lang['Disallow_explain'] = 'Here you can control usernames which will not be allowed to be used. Disallowed usernames are allowed to contain a wildcard character of *. Please note that you will not be allowed to specify any username that has already been registered. You must first delete that name then disallow it.'; $lang['Delete_disallow'] = 'Delete'; $lang['Delete_disallow_title'] = 'Remove a Disallowed Username'; *************** *** 562,568 **** $lang['Disallowed_deleted'] = 'The disallowed username has been successfully removed'; $lang['Disallow_successful'] = 'The disallowed username has been successfully added'; ! $lang['Disallowed_already'] = 'The name you entered could not be disallowed. It either already exists in the list, exists in the word censor list, or a matching username is present'; $lang['Click_return_disallowadmin'] = 'Click %sHere%s to return to Disallow Username Administration'; --- 570,576 ---- $lang['Disallowed_deleted'] = 'The disallowed username has been successfully removed'; $lang['Disallow_successful'] = 'The disallowed username has been successfully added'; ! $lang['Disallowed_already'] = 'The name you entered could not be disallowed. It either already exists in the list, exists in the word censor list, or a matching username is present.'; $lang['Click_return_disallowadmin'] = 'Click %sHere%s to return to Disallow Username Administration'; *************** *** 572,578 **** // $lang['Styles_admin'] = 'Styles Administration'; $lang['Styles_explain'] = 'Using this facility you can add, remove and manage styles (templates and themes) available to your users'; ! $lang['Styles_addnew_explain'] = 'The following list contains all the themes that are available for the templates you currently have. The items on this list have not yet been installed into the phpBB database. To install a theme simply click the install link beside an entry'; $lang['Select_template'] = 'Select a Template'; --- 580,586 ---- // $lang['Styles_admin'] = 'Styles Administration'; $lang['Styles_explain'] = 'Using this facility you can add, remove and manage styles (templates and themes) available to your users'; ! $lang['Styles_addnew_explain'] = 'The following list contains all the themes that are available for the templates you currently have. The items on this list have not yet been installed into the phpBB database. To install a theme, simply click the install link beside an entry.'; $lang['Select_template'] = 'Select a Template'; *************** *** 596,602 **** $lang['Theme_updated'] = 'The selected theme has been updated. You should now export the new theme settings'; $lang['Theme_created'] = 'Theme created. You should now export the theme to the theme configuration file for safe keeping or use elsewhere'; ! $lang['Confirm_delete_style'] = 'Are you sure you want to delete this style'; $lang['Download_theme_cfg'] = 'The exporter could not write the theme information file. Click the button below to download this file with your browser. Once you have downloaded it you can transfer it to the directory containing the template files. You can then package the files for distribution or use elsewhere if you desire'; $lang['No_themes'] = 'The template you selected has no themes attached to it. To create a new theme click the Create New link on the left hand panel'; --- 604,610 ---- $lang['Theme_updated'] = 'The selected theme has been updated. You should now export the new theme settings'; $lang['Theme_created'] = 'Theme created. You should now export the theme to the theme configuration file for safe keeping or use elsewhere'; ! $lang['Confirm_delete_style'] = 'Are you sure you want to delete this style?'; $lang['Download_theme_cfg'] = 'The exporter could not write the theme information file. Click the button below to download this file with your browser. Once you have downloaded it you can transfer it to the directory containing the template files. You can then package the files for distribution or use elsewhere if you desire'; $lang['No_themes'] = 'The template you selected has no themes attached to it. To create a new theme click the Create New link on the left hand panel'; *************** *** 669,675 **** $lang['Previous_Install'] = 'A previous installation has been detected'; $lang['Install_db_error'] = 'An error occurred trying to update the database'; ! $lang['Re_install'] = 'Your previous installation is still active.

If you would like to re-install phpBB 2 you should click the Yes button below. Please be aware that doing so will destroy all existing data, no backups will be made! The administrator username and password you have used to login in to the board will be re-created after the re-installation, no other settings will be retained.

Think carefully before pressing Yes!'; $lang['Inst_Step_0'] = 'Thank you for choosing phpBB 2. In order to complete this install please fill out the details requested below. Please note that the database you install into should already exist. If you are installing to a database that uses ODBC, e.g. MS Access you should first create a DSN for it before proceeding.'; --- 677,683 ---- $lang['Previous_Install'] = 'A previous installation has been detected'; $lang['Install_db_error'] = 'An error occurred trying to update the database'; ! $lang['Re_install'] = 'Your previous installation is still active.

If you would like to re-install phpBB 2 you should click the Yes button below. Please be aware that doing so will destroy all existing data and no backups will be made! The administrator username and password you have used to login in to the board will be re-created after the re-installation and no other settings will be retained.

Think carefully before pressing Yes!'; $lang['Inst_Step_0'] = 'Thank you for choosing phpBB 2. In order to complete this install please fill out the details requested below. Please note that the database you install into should already exist. If you are installing to a database that uses ODBC, e.g. MS Access you should first create a DSN for it before proceeding.'; *************** *** 691,710 **** $lang['Inst_Step_2'] = 'Your admin username has been created. At this point your basic installation is complete. You will now be taken to a screen which will allow you to administer your new installation. Please be sure to check the General Configuration details and make any required changes. Thank you for choosing phpBB 2.'; ! $lang['Unwriteable_config'] = 'Your config file is un-writeable at present. A copy of the config file will be downloaded to your when you click the button below. You should upload this file to the same directory as phpBB 2. Once this is done you should log in using the administrator name and password you provided on the previous form and visit the admin control centre (a link will appear at the bottom of each screen once logged in) to check the general configuration. Thank you for choosing phpBB 2.'; $lang['Download_config'] = 'Download Config'; $lang['ftp_choose'] = 'Choose Download Method'; ! $lang['ftp_option'] = '
Since FTP extensions are enabled in this version of PHP you may also be given the option of first trying to automatically ftp the config file into place.'; ! $lang['ftp_instructs'] = 'You have chosen to ftp the file to the account containing phpBB 2 automatically. Please enter the information below to facilitate this process. Note that the FTP path should be the exact path via ftp to your phpBB2 installation as if you were ftping to it using any normal client.'; $lang['ftp_info'] = 'Enter Your FTP Information'; ! $lang['Attempt_ftp'] = 'Attempt to ftp config file into place'; ! $lang['Send_file'] = 'Just send the file to me and I\'ll ftp it manually'; $lang['ftp_path'] = 'FTP path to phpBB 2'; $lang['ftp_username'] = 'Your FTP Username'; $lang['ftp_password'] = 'Your FTP Password'; $lang['Transfer_config'] = 'Start Transfer'; ! $lang['NoFTP_config'] = 'The attempt to ftp the config file into place failed. Please download the config file and ftp it into place manually.'; $lang['Install'] = 'Install'; $lang['Upgrade'] = 'Upgrade'; --- 699,718 ---- $lang['Inst_Step_2'] = 'Your admin username has been created. At this point your basic installation is complete. You will now be taken to a screen which will allow you to administer your new installation. Please be sure to check the General Configuration details and make any required changes. Thank you for choosing phpBB 2.'; ! $lang['Unwriteable_config'] = 'Your config file is un-writeable at present. A copy of the config file will be downloaded to your computer when you click the button below. You should upload this file to the same directory as phpBB 2. Once this is done you should log in using the administrator name and password you provided on the previous form and visit the admin control center (a link will appear at the bottom of each screen once logged in) to check the general configuration. Thank you for choosing phpBB 2.'; $lang['Download_config'] = 'Download Config'; $lang['ftp_choose'] = 'Choose Download Method'; ! $lang['ftp_option'] = '
Since FTP extensions are enabled in this version of PHP you may also be given the option of first trying to automatically FTP the config file into place.'; ! $lang['ftp_instructs'] = 'You have chosen to FTP the file to the account containing phpBB 2 automatically. Please enter the information below to facilitate this process. Note that the FTP path should be the exact path via FTP to your phpBB2 installation as if you were FTPing to it using any normal client.'; $lang['ftp_info'] = 'Enter Your FTP Information'; ! $lang['Attempt_ftp'] = 'Attempt to FTP config file into place'; ! $lang['Send_file'] = 'Just send the file to me and I\'ll FTP it manually'; $lang['ftp_path'] = 'FTP path to phpBB 2'; $lang['ftp_username'] = 'Your FTP Username'; $lang['ftp_password'] = 'Your FTP Password'; $lang['Transfer_config'] = 'Start Transfer'; ! $lang['NoFTP_config'] = 'The attempt to FTP the config file into place failed. Please download the config file and FTP it into place manually.'; $lang['Install'] = 'Install'; $lang['Upgrade'] = 'Upgrade'; *************** *** 712,720 **** $lang['Install_Method'] = 'Choose your installation method'; ! $lang['Install_No_Ext'] = 'The php configuration on your server doesn\'t support the database type that you choose'; ! $lang['Install_No_PCRE'] = 'phpBB2 Requires the Perl-Compatible Regular Expressions Module for php which your php configuration doesn\'t appear to support!'; // // That's all Folks! --- 720,728 ---- $lang['Install_Method'] = 'Choose your installation method'; ! $lang['Install_No_Ext'] = 'The PHP configuration on your server doesn\'t support the database type that you chose'; ! $lang['Install_No_PCRE'] = 'phpBB2 Requires the Perl-Compatible Regular Expressions Module for PHP which your PHP configuration doesn\'t appear to support!'; // // That's all Folks! diff -crbB phpbb203/language/lang_english/lang_bbcode.php phpbb206/language/lang_english/lang_bbcode.php *** phpbb203/language/lang_english/lang_bbcode.php Sun Jun 15 14:32:16 2003 --- phpbb206/language/lang_english/lang_bbcode.php Sun Jul 20 16:37:23 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: lang_bbcode.php,v 1.3 2001/12/18 01:53:26 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: lang_bbcode.php,v 1.3.2.2 2002/12/18 15:40:20 psotfx Exp $ * * ***************************************************************************/ *************** *** 20,25 **** --- 20,30 ---- * ***************************************************************************/ + /* CONTRIBUTORS + 2002-12-15 Philip M. White (pwhite@mailhaven.com) + Fixed many minor grammatical problems. + */ + // // To add an entry to your BBCode guide simply add a line to this file in this format: // $faq[] = array("question", "answer"); *************** *** 39,67 **** // $faq[] = array("--","Introduction"); ! $faq[] = array("What is BBCode?", "BBCode is a special implementation of HTML. Whether you can actually use BBCode in your posts on the forum is determined by the administrator. In addition you can disable BBCode on a per post basis via the posting form. BBCode itself is similar in style to HTML, tags are enclosed in square braces [ and ] rather than < and > and it offers greater control over what and how something is displayed. Depending on the template you are using you may find adding BBCode to your posts is made much easier through a clickable interface above the message area on the posting form. Even with this you may find the following guide useful."); $faq[] = array("--","Text Formatting"); $faq[] = array("How to create bold, italic and underlined text", "BBCode includes tags to allow you to quickly change the basic style of your text. This is achieved in the following ways: "); $faq[] = array("How to change the text colour or size", "To alter the color or size of your text the following tags can be used. Keep in mind that how the output appears will depend on the viewers browser and system: "); ! $faq[] = array("Can I combine formatting tags?", "Yes, of course you can, for example to get someones attention you may write:

[size=18][color=red][b]LOOK AT ME![/b][/color][/size]

this would output LOOK AT ME!

We don't recommend you output lots of text that looks like this though! Remember it is up to you, the poster to ensure tags are closed correctly. For example the following is incorrect:

[b][u]This is wrong[/b][/u]"); $faq[] = array("--","Quoting and outputting fixed-width text"); ! $faq[] = array("Quoting text in replies", "There are two ways you can quote text, with a reference or without."); ! $faq[] = array("Outputting code or fixed width data", "If you want to output a piece of code or in fact anything that requires a fixed width, eg. Courier type font you should enclose the text in [code][/code] tags, eg.

[code]echo \"This is some code\";[/code]

All formatting used within [code][/code] tags is retained when you later view it."); $faq[] = array("--","Generating lists"); ! $faq[] = array("Creating an Un-ordered list", "BBCode supports two types of lists, unordered and ordered. They are essentially the same as their HTML equivalents. An unordered list ouputs each item in your list sequentially one after the other indenting each with a bullet character. To create an unordered list you use [list][/list] and define each item within the list using [*]. For example to list your favorite colours you could use:

[list]
[*]Red
[*]Blue
[*]Yellow
[/list]

This would generate the following list:"); $faq[] = array("Creating an Ordered list", "The second type of list, an ordered list gives you control over what is output before each item. To create an ordered list you use [list=1][/list] to create a numbered list or alternatively [list=a][/list] for an alphabetical list. As with the unordered list items are specified using [*]. For example:

[list=1]
[*]Go to the shops
[*]Buy a new computer
[*]Swear at computer when it crashes
[/list]

will generate the following:
  1. Go to the shops
  2. Buy a new computer
  3. Swear at computer when it crashes
Whereas for an alphabetical list you would use:

[list=a]
[*]The first possible answer
[*]The second possible answer
[*]The third possible answer
[/list]

giving
  1. The first possible answer
  2. The second possible answer
  3. The third possible answer
"); $faq[] = array("--", "Creating Links"); ! $faq[] = array("Linking to another site", "phpBB BBCode supports a number of ways of creating URIs, Uniform Resource Indicators better known as URLs.As with all the BBCode tags you can wrap URLs around any of the other tags such as [img][/img] (see next entry), [b][/b], etc. As with the formatting tags it is up to you to ensure the correct open and close order is following, for example:

[url=http://www.phpbb.com/][img]http://www.phpbb.com/images/phplogo.gif[/url][/img]

is not correct which may lead to your post being deleted so take care."); $faq[] = array("--", "Showing images in posts"); ! $faq[] = array("Adding an image to a post", "phpBB BBCode incorporates a tag for including images in your posts. Two very important things to remember when using this tag are; many users do not appreciate lots of images being shown in posts and secondly the image you display must already be available on the internet (it cannot exist only on your computer for example, unless you run a webserver!). There is currently no way of storing images locally with phpBB (all these issues are expected to be addressed in the next release of phpBB). To display an image you must surround the URL pointing to the image with [img][/img] tags. For example:

[img]http://www.phpbb.com/images/phplogo.gif[/img]

As noted in the URL section above you can wrap an image in a [url][/url] tag if you wish, eg.

[url=http://www.phpbb.com/][img]http://www.phpbb.com/images/phplogo.gif[/img][/url]

would generate:

\"\"
"); $faq[] = array("--", "Other matters"); ! $faq[] = array("Can I add my own tags?", "No, I am afraid not directly in phpBB 2.0. We are looking at offering customisable BBCode tags for the next major version"); // // This ends the BBCode guide entries --- 44,72 ---- // $faq[] = array("--","Introduction"); ! $faq[] = array("What is BBCode?", "BBCode is a special implementation of HTML. Whether you can actually use BBCode in your posts on the forum is determined by the administrator. In addition, you can disable BBCode on a per post basis via the posting form. BBCode itself is similar in style to HTML: tags are enclosed in square braces [ and ] rather than < and > and it offers greater control over what and how something is displayed. Depending on the template you are using you may find adding BBCode to your posts is made much easier through a clickable interface above the message area on the posting form. Even with this you may find the following guide useful."); $faq[] = array("--","Text Formatting"); $faq[] = array("How to create bold, italic and underlined text", "BBCode includes tags to allow you to quickly change the basic style of your text. This is achieved in the following ways: "); $faq[] = array("How to change the text colour or size", "To alter the color or size of your text the following tags can be used. Keep in mind that how the output appears will depend on the viewers browser and system: "); ! $faq[] = array("Can I combine formatting tags?", "Yes, of course you can; for example to get someones attention you may write:

[size=18][color=red][b]LOOK AT ME![/b][/color][/size]

this would output LOOK AT ME!

We don't recommend you output lots of text that looks like this, though! Remember that it is up to you, the poster, to ensure that tags are closed correctly. For example, the following is incorrect:

[b][u]This is wrong[/b][/u]"); $faq[] = array("--","Quoting and outputting fixed-width text"); ! $faq[] = array("Quoting text in replies", "There are two ways you can quote text: with a reference or without."); ! $faq[] = array("Outputting code or fixed width data", "If you want to output a piece of code or in fact anything that requires a fixed width with a Courier-type font, you should enclose the text in [code][/code] tags, eg.

[code]echo \"This is some code\";[/code]

All formatting used within [code][/code] tags is retained when you later view it."); $faq[] = array("--","Generating lists"); ! $faq[] = array("Creating an Un-ordered list", "BBCode supports two types of lists, unordered and ordered. They are essentially the same as their HTML equivalents. An unordered list ouputs each item in your list sequentially one after the other indenting each with a bullet character. To create an unordered list you use [list][/list] and define each item within the list using [*]. For example, to list your favorite colours you could use:

[list]
[*]Red
[*]Blue
[*]Yellow
[/list]

This would generate the following list:"); $faq[] = array("Creating an Ordered list", "The second type of list, an ordered list gives you control over what is output before each item. To create an ordered list you use [list=1][/list] to create a numbered list or alternatively [list=a][/list] for an alphabetical list. As with the unordered list items are specified using [*]. For example:

[list=1]
[*]Go to the shops
[*]Buy a new computer
[*]Swear at computer when it crashes
[/list]

will generate the following:
  1. Go to the shops
  2. Buy a new computer
  3. Swear at computer when it crashes
Whereas for an alphabetical list you would use:

[list=a]
[*]The first possible answer
[*]The second possible answer
[*]The third possible answer
[/list]

giving
  1. The first possible answer
  2. The second possible answer
  3. The third possible answer
"); $faq[] = array("--", "Creating Links"); ! $faq[] = array("Linking to another site", "phpBB BBCode supports a number of ways of creating URIs, Uniform Resource Indicators better known as URLs.As with all the BBCode tags you can wrap URLs around any of the other tags such as [img][/img] (see next entry), [b][/b], etc. As with the formatting tags it is up to you to ensure the correct open and close order is following. For example:

[url=http://www.phpbb.com/][img]http://www.phpbb.com/images/phplogo.gif[/url][/img]

is not correct which may lead to your post being deleted so take care."); $faq[] = array("--", "Showing images in posts"); ! $faq[] = array("Adding an image to a post", "phpBB BBCode incorporates a tag for including images in your posts. Two very important things to remember when using this tag are: many users do not appreciate lots of images being shown in posts and second, the image you display must already be available on the Internet (it cannot exist only on your computer, for example, unless you run a webserver!). There is currently no way of storing images locally with phpBB (all these issues are expected to be addressed in the next release of phpBB). To display an image, you must surround the URL pointing to the image with [img][/img] tags. For example:

[img]http://www.phpbb.com/images/phplogo.gif[/img]

As noted in the URL section above you can wrap an image in a [url][/url] tag if you wish, eg.

[url=http://www.phpbb.com/][img]http://www.phpbb.com/images/phplogo.gif[/img][/url]

would generate:

\"\"
"); $faq[] = array("--", "Other matters"); ! $faq[] = array("Can I add my own tags?", "No, I am afraid not directly in phpBB 2.0. We are looking at offering customisable BBCode tags for the next major version."); // // This ends the BBCode guide entries diff -crbB phpbb203/language/lang_english/lang_faq.php phpbb206/language/lang_english/lang_faq.php *** phpbb203/language/lang_english/lang_faq.php Sun Jun 15 14:32:15 2003 --- phpbb206/language/lang_english/lang_faq.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: lang_faq.php,v 1.4.2.2 2002/08/04 17:21:22 dougk_ff7 Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: lang_faq.php,v 1.4.2.3 2002/12/18 15:40:20 psotfx Exp $ * * ***************************************************************************/ *************** *** 20,25 **** --- 20,30 ---- * ***************************************************************************/ + /* CONTRIBUTORS: + 2002-12-15 Philip M. White (pwhite@mailhaven.com) + Fixed many minor grammatical problems. + */ + // // To add an entry to your FAQ simply add a line to this file in this format: // $faq[] = array("question", "answer"); *************** *** 34,98 **** $faq[] = array("--","Login and Registration Issues"); ! $faq[] = array("Why can't I login?", "Have you registered? Seriously, you must register in order to login. Have you been banned from the board (a message will be displayed if you have)? If so then you should contact the webmaster or board administrator to find out why. If you have registered and are not banned and you still cannot login then check and double check your username and password. Usually this is the problem, if not then contact the board administrator they may have incorrect configuration settings for the board."); ! $faq[] = array("Why do I need to register at all?", "You may not have too, it is up to the administrator of the board as to whether you need to register in order to post messages. However registration will give you access to additional features not available to guest users such as definable avatar images, private messaging, emailing of fellow users, usergroup subscription, etc. It only takes a few moments to register so it is recommended you do so."); ! $faq[] = array("Why do I get logged off automatically?", "If you do not check the Log me in automatically box when you login the board will only keep you logged in for a preset time. This prevents misuse of your account by anyone else. To stay logged in check the box during login, this is not recommended if you access the board from a shared computer, e.g. library, internet cafe, university cluster, etc."); ! $faq[] = array("How do I prevent my username appearing in the online user listings?", "In your profile you will find an option Hide your online status, if you switch this on you'll only appear to board administrators or to yourself. You will be counted as a hidden user."); ! $faq[] = array("I've lost my password!", "Don't panic! While your password cannot be retrieved it can be reset. To do this go to the login page and click I've forgotten my password, follow the instructions and you should be back online in no time"); ! $faq[] = array("I registered but cannot login!", "Firstly check your are entering the correct username and password. If they are okay then one of two things may have happened. If COPPA support is enabled and you clicked the I am under 13 years old link while registering then you will have to follow the instructions you received. If this is not the case then does your account need activating? Some boards will require all new registrations be activated, either by yourself or by the administrator before you can logon. When you registered it would have told you whether activation was required. If you were sent an email then follow the instructions, if you did not receive the email then are you sure your email address is valid? One reason activation is used is to reduce the possibility of rogue users abusing the board anonymously. If you are sure the email address you used is valid then try contacting the board administrator."); ! $faq[] = array("I registered in the past but cannot login any more?!", "The most likely reasons for this are; you entered an incorrect username or password (check the email you were sent when you first registered) or the administrator has deleted your account for some reason. If it is the later case then perhaps you did not post anything? It is usual for boards to periodically remove users who have not posted anything so as to reduce the size of the database. Try registering again and get involved in discussions."); $faq[] = array("--","User Preferences and settings"); ! $faq[] = array("How do I change my settings?", "All your settings (if you are registered) are stored in the database. To alter them click the Profile link (generally shown at the top of pages but this may not be the case). This will allow you to change all your settings"); ! $faq[] = array("The times are not correct!", "The times are almost certainly correct, however what you may be seeing are times displayed in a timezone different from the one you are in. If this is the case you should change your profile setting for the timezone to match your particular area, e.g. London, Paris, New York, Sydney, etc. Please note that changing the timezone, like most settings can only be done by registered users. So if you are not registered this is a good time to do so, if you pardon the pun!"); ! $faq[] = array("I changed the timezone and the time is still wrong!", "If you are sure you have set the timezone correctly and the time is still different the most likely answer is daylight savings time (or summer time as it is known in the UK and other places). The board is not designed to handle the changeovers between standard and daylight time so during summer months the time may be an hour different from the real local time."); ! $faq[] = array("My language is not in the list!", "The most likely reasons for this are either the administrator did not install your language or someone has not translated this board into your language. Try asking the board administrator if they can install the language pack you need, if it does not exist then please feel free to create a new translation. More information can be found at the phpBB Group website (see link at bottom of pages)"); ! $faq[] = array("How do I show an image below my username?", "There may be two images below a username when viewing posts. The first is an image associated with your rank, generally these take the form of stars or blocks indicating how many posts you have made or your status on the forums. Below this may be a larger image known as an avatar, this is generally unique or personal to each user. It is up to the board administrator to enable avatars and they have a choice over the way in which avatars can be made available. If you are unable to use avatars then this is the decision of the board admin, you should ask them their reasons (we're sure they'll be good!)"); ! $faq[] = array("How do I change my rank?", "In general you cannot directly change the wording of any rank (ranks appear below your username in topics and on your profile depending on the style used). Most boards use ranks to indicate the number of posts you have made and to identify certain users, e.g. moderators and administrators may have a special rank. Please do not abuse the board by posting unnecessarily just to increase your rank, you will probably find the moderator or administrator will simply lower your post count."); ! $faq[] = array("When I click the email link for a user it asks me to login?", "Sorry but only registered users can send email to people via the built-in email form (if the admin has enabled this feature). This is to prevent malicious use of the email system by anonymous users."); $faq[] = array("--","Posting Issues"); ! $faq[] = array("How do I post a topic in a forum?", "Easy, click the relevant button on either the forum or topic screens. You may need to register before you can post a message, the facilities available to you are listed at the bottom of the forum and topic screens (the You can post new topics, You can vote in polls, etc. list)"); ! $faq[] = array("How do I edit or delete a post?", "Unless you are the board admin or forum moderator you can only edit or delete your own posts. You can edit a post (sometimes for only a limited time after it was made) by clicking the edit button for the relevant post. If someone has already replied to the post you will find a small piece of text output below the post when you return to the topic, this lists the number of times you edited it. This will only appear if no one has replied, it also will not appear if moderators or administrators edit the post (they should leave a message saying what they altered and why). Please note that normal users cannot delete a post once someone has replied."); ! $faq[] = array("How do I add a signature to my post?", "To add a signature to a post you must first create one, this is done via your profile. Once created you can check the Add Signature box on the posting form to add your signature. You can also add a signature by default to all your posts by checking the appropriate radio box in your profile (you can still prevent a signature being added to individual posts by un-checking the add signature box on the posting form)"); ! $faq[] = array("How do I create a poll?", "Creating a poll is easy, when you post a new topic (or edit the first post of a topic, if you have permission) you should see a Add Poll form below the main posting box (if you cannot see this then you probably do not have rights to create polls). You should enter a title for the poll and then at least two options (to set an option type in the poll question and click the Add option button. You can also set a time limit for the poll, 0 is an infinite poll. There will be a limit to the number of options you can list, this is set by the board administrator"); ! $faq[] = array("How do I edit or delete a poll?", "As with posts, polls can only be edited by the original poster, a moderator or board admin. To edit a poll click the first post in the topic (this always has the poll associated with it). If no one has cast a vote then users can delete the poll or edit any poll option, however if people have already placed votes only moderators or administrators can edit or delete it. This is to prevent people rigging polls by changing options mid-way through a poll"); ! $faq[] = array("Why can't I access a forum?", "Some forums may be limited to certain users or groups. To view, read, post, etc. you may need special authorisation, only the forum moderator and board admin can grant this access, you should contact them."); ! $faq[] = array("Why can't I vote in polls?", "Only registered users can vote in polls (so as to prevent spoofing of results). If you have registered and still cannot vote then you probably do not have appropriate access rights."); $faq[] = array("--","Formatting and Topic Types"); ! $faq[] = array("What is BBCode?", "BBCode is a special implementation of HTML, whether you can use BBCode is determined by the administrator (you can also disable it on a per post basis from the posting form). BBCode itself is similar in style to HTML, tags are enclosed in square braces [ and ] rather than < and > and it offers greater control over what and how something is displayed. For more information on BBCode see the guide which can be accessed from the posting page."); ! $faq[] = array("Can I use HTML?", "That depends on whether the administrator allows you too, they have complete control over it. If you are allowed to use it you will probably find only certain tags work. This is a safety feature to prevent people abusing the board by using tags which may destroy the layout or cause other problems. If HTML is enabled you can disable it on a per post basis from the posting form."); ! $faq[] = array("What are Smileys?", "Smileys, or Emoticons are small graphical images which can be used to express some feeling using a short code, e.g. :) means happy, :( means sad. The full list of emoticons can be seen via the posting form. Try not to overuse smileys though, they can quickly render a post unreadable and a moderator may decide to edit them out or remove the post altogether"); ! $faq[] = array("Can I post Images?", "Images can indeed be shown in your posts. However, there is no facility at present for uploading images directly to this board. Therefore you must link to an image stored on a publicly accessible web server, e.g. http://www.some-unknown-place.net/my-picture.gif. You cannot link to pictures stored on your own PC (unless it is a publicly accessible server) nor images stored behind authentication mechanisms, e.g. hotmail or yahoo mailboxes, password protected sites, etc. To display the image use either the BBCode [img] tag or appropriate HTML (if allowed)."); ! $faq[] = array("What are Announcements?", "Announcements often contain important information and you should read them as soon as possible. Announcements appear at the top of every page in the forum to which they are posted. Whether or not you can post an announcement depends on the permissions required, these are set by the administrator."); $faq[] = array("What are Sticky topics?", "Sticky topics appear below any announcements in viewforum and only on the first page. They are often quite important so you should read them where possible. As with announcements the board administrator determines what permissions are required to post sticky topics in each forum."); ! $faq[] = array("What are Locked topics?", "Locked topics are set this way by either the forum moderator or board administrator. You cannot reply to locked topics and any poll it contained is automatically ended. Topics may be locked for many reasons."); $faq[] = array("--","User Levels and Groups"); ! $faq[] = array("What are Administrators?", "Administrators are people assigned the highest level of control over the entire board. These people can control all facets of board operation which includes setting permissions, banning users, creating usergroups or moderators, etc. They also have full moderator capabilities in all the forums."); $faq[] = array("What are Moderators?", "Moderators are individuals (or groups of individuals) whose job it is to look after the running of the forums from day to day. They have the power to edit or delete posts and lock, unlock, move, delete and split topics in the forum they moderate. Generally moderators are there to prevent people going off-topic or posting abusive or offensive material."); $faq[] = array("What are Usergroups?", "Usergroups are a way in which board administrators can group users. Each user can belong to several groups (this differs from most other boards) and each group can be assigned individual access rights. This makes it easy for administrators to set up several users as moderators of a forum, or to give them access to a private forum, etc."); ! $faq[] = array("How do I join a Usergroup?", "To join a usergroup click the usergroup link on the page header (dependent on template design), you can then view all usergroups. Not all groups are open access, some are closed and some may even have hidden memberships. If the board is open then you can request to join it by clicking the appropriate button. The user group moderator will need to approve your request, they may ask why you want to join the group. Please do not pester a group moderator if they turn your request down, they will have their reasons."); ! $faq[] = array("How do I become a Usergroup Moderator?", "Usergroups are initially created by the board admin, they also assign a board moderator. If you are interested in creating a usergroup then your first point of contact should be the admin, try dropping them a private message."); $faq[] = array("--","Private Messaging"); ! $faq[] = array("I cannot send private messages!", "There are three reasons for this; you are not registered and/or not logged on, the board administrator has disabled private messaging for the entire board or the board administrator has prevented you from sending messages. If it is the later case you should try asking the administrator why."); ! $faq[] = array("I keep getting unwanted private messages!", "In the future we will be adding an ignore list to the private messaging system. For now though if you keep receiving unwanted private messages from someone inform the board admin, they have the power to prevent a user from sending private messages at all."); ! $faq[] = array("I have received a spamming or abusive email from someone on this board!", "We are sorry to hear that. The email form feature of this board includes safeguards to try and track users who send such posts. You should email the board administrator with a full copy of the email you received, it is very important this include the headers (these list details of the user that sent the email). They can then take action."); // // These entries should remain in all languages and for all modifications // $faq[] = array("--","phpBB 2 Issues"); ! $faq[] = array("Who wrote this bulletin board?", "This software (in its unmodified form) is produced, released and is copyright phpBB Group. It is made available under the GNU General Public Licence and may be freely distributed, see link for more details"); ! $faq[] = array("Why isn't X feature available?", "This software was written by and licensed through phpBB Group. If you believe a feature needs to be added then please visit the phpbb.com website and see what phpBB Group have to say. Please do not post feature requests to the board at phpbb.com, the Group uses sourceforge to handle tasking of new features. Please read through the forums and see what, if any, our position may already be for a feature and then follow the procedure given there."); ! $faq[] = array("Who do I contact about abusive and/or legal matters related to this board?", "You should contact the administrator of this board. If you cannot find who this you should first contact one of the forum moderators and ask them who you should in turn contact. If still get no response you should contact the owner of the domain (do a whois lookup) or, if this is running on a free service (e.g. yahoo, free.fr, f2s.com, etc.), the management or abuse department of that service. Please note that phpBB Group has absolutely no control and cannot in any way be held liable over how, where or by whom this board is used. It is absolutely pointless contacting phpBB Group in relation to any legal (cease and desist, liable, defamatory comment, etc.) matter not directly related to the phpbb.com website or the discrete software of phpBB itself. If you do email phpBB Group about any third party use of this software then you should expect a terse response or no response at all."); // // This ends the FAQ entries --- 39,103 ---- $faq[] = array("--","Login and Registration Issues"); ! $faq[] = array("Why can't I log in?", "Have you registered? Seriously, you must register in order to log in. Have you been banned from the board? (A message will be displayed if you have.) If so, you should contact the webmaster or board administrator to find out why. If you have registered and are not banned and you still cannot log in then check and double-check your username and password. Usually this is the problem; if not, contact the board administrator -- they may have incorrect configuration settings for the board."); ! $faq[] = array("Why do I need to register at all?", "You may not have to -- it is up to the administrator of the board as to whether you need to register in order to post messages. However, registration will give you access to additional features not available to guest users such as definable avatar images, private messaging, emailing to fellow users, usergroup subscription, etc. It only takes a few minutes to register so it is recommended you do so."); ! $faq[] = array("Why do I get logged off automatically?", "If you do not check the Log me in automatically box when you log in, the board will only keep you logged in for a preset time. This prevents misuse of your account by anyone else. To stay logged in, check the box during login. This is not recommended if you access the board from a shared computer, e.g. library, internet cafe, university cluster, etc."); ! $faq[] = array("How do I prevent my username from appearing in the online user listings?", "In your profile you will find an option Hide your online status; if you switch this on you'll only appear to board administrators or to yourself. You will be counted as a hidden user."); ! $faq[] = array("I've lost my password!", "Don't panic! While your password cannot be retrieved it can be reset. To do this go to the login page and click I've forgotten my password. Follow the instructions and you should be back online in no time."); ! $faq[] = array("I registered but cannot log in!", "First check that you are entering the correct username and password. If they are okay then one of two things may have happened: if COPPA support is enabled and you clicked the I am under 13 years old link while registering then you will have to follow the instructions you received. If this is not the case then maybe your account need activating. Some boards will require all new registrations be activated, either by yourself or by the administrator before you can log on. When you registered it would have told you whether activation was required. If you were sent an email then follow the instructions; if you did not receive the email then check that your email address is valid. One reason activation is used is to reduce the possibility of rogue users abusing the board anonymously. If you are sure the email address you used is valid then try contacting the board administrator."); ! $faq[] = array("I registered in the past but cannot log in anymore!", "The most likely reasons for this are: you entered an incorrect username or password (check the email you were sent when you first registered) or the administrator has deleted your account for some reason. If it is the latter case then perhaps you did not post anything? It is usual for boards to periodically remove users who have not posted anything so as to reduce the size of the database. Try registering again and get involved in discussions."); $faq[] = array("--","User Preferences and settings"); ! $faq[] = array("How do I change my settings?", "All your settings (if you are registered) are stored in the database. To alter them click the Profile link (generally shown at the top of pages but this may not be the case). This will allow you to change all your settings."); ! $faq[] = array("The times are not correct!", "The times are almost certainly correct; however, what you may be seeing are times displayed in a timezone different from the one you are in. If this is the case, you should change your profile setting for the timezone to match your particular area, e.g. London, Paris, New York, Sydney, etc. Please note that changing the timezone, like most settings, can only be done by registered users. So if you are not registered, this is a good time to do so, if you pardon the pun!"); ! $faq[] = array("I changed the timezone and the time is still wrong!", "If you are sure you have set the timezone correctly and the time is still different, the most likely answer is daylight savings time (or summer time as it is known in the UK and other places). The board is not designed to handle the changeovers between standard and daylight time so during summer months the time may be an hour different from the real local time."); ! $faq[] = array("My language is not in the list!", "The most likely reasons for this are either the administrator did not install your language or someone has not translated this board into your language. Try asking the board administrator if they can install the language pack you need or if it does not exist, please feel free to create a new translation. More information can be found at the phpBB Group website (see link at bottom of pages)"); ! $faq[] = array("How do I show an image below my username?", "There may be two images below a username when viewing posts. The first is an image associated with your rank; generally these take the form of stars or blocks indicating how many posts you have made or your status on the forums. Below this may be a larger image known as an avatar; this is generally unique or personal to each user. It is up to the board administrator to enable avatars and they have a choice over the way in which avatars can be made available. If you are unable to use avatars then this is the decision of the board admin and you should ask them their reasons (we're sure they'll be good!)"); ! $faq[] = array("How do I change my rank?", "In general you cannot directly change the wording of any rank (ranks appear below your username in topics and on your profile depending on the style used). Most boards use ranks to indicate the number of posts you have made and to identify certain users. For example, moderators and administrators may have a special rank. Please do not abuse the board by posting unnecessarily just to increase your rank -- you will probably find the moderator or administrator will simply lower your post count."); ! $faq[] = array("When I click the email link for a user it asks me to log in.", "Sorry, but only registered users can send email to people via the built-in email form (if the admin has enabled this feature). This is to prevent malicious use of the email system by anonymous users."); $faq[] = array("--","Posting Issues"); ! $faq[] = array("How do I post a topic in a forum?", "Easy -- click the relevant button on either the forum or topic screens. You may need to register before you can post a message. The facilities available to you are listed at the bottom of the forum and topic screens (the You can post new topics, You can vote in polls, etc. list)"); ! $faq[] = array("How do I edit or delete a post?", "Unless you are the board admin or forum moderator you can only edit or delete your own posts. You can edit a post (sometimes for only a limited time after it was made) by clicking the edit button for the relevant post. If someone has already replied to the post, you will find a small piece of text output below the post when you return to the topic that lists the number of times you edited it. This will only appear if no one has replied; it also will not appear if moderators or administrators edit the post (they should leave a message saying what they altered and why). Please note that normal users cannot delete a post once someone has replied."); ! $faq[] = array("How do I add a signature to my post?", "To add a signature to a post you must first create one; this is done via your profile. Once created you can check the Add Signature box on the posting form to add your signature. You can also add a signature by default to all your posts by checking the appropriate radio box in your profile. You can still prevent a signature being added to individual posts by un-checking the add signature box on the posting form."); ! $faq[] = array("How do I create a poll?", "Creating a poll is easy -- when you post a new topic (or edit the first post of a topic, if you have permission) you should see a Add Poll form below the main posting box. If you cannot see this then you probably do not have rights to create polls. You should enter a title for the poll and then at least two options -- to set an option type in the poll question and click the Add option button. You can also set a time limit for the poll, 0 being an infinite amount. There will be a limit to the number of options you can list, which is set by the board administrator"); ! $faq[] = array("How do I edit or delete a poll?", "As with posts, polls can only be edited by the original poster, a moderator, or board administrator. To edit a poll, click the first post in the topic, which always has the poll associated with it. If no one has cast a vote then users can delete the poll or edit any poll option. However, if people have already placed votes only moderators or administrators can edit or delete it; this is to prevent people rigging polls by changing options mid-way through a poll"); ! $faq[] = array("Why can't I access a forum?", "Some forums may be limited to certain users or groups. To view, read, post, etc. you may need special authorization which only the forum moderator and board administrator can grant, so you should contact them."); ! $faq[] = array("Why can't I vote in polls?", "Only registered users can vote in polls so as to prevent spoofing of results. If you have registered and still cannot vote then you probably do not have appropriate access rights."); $faq[] = array("--","Formatting and Topic Types"); ! $faq[] = array("What is BBCode?", "BBCode is a special implementation of HTML. Whether you can use BBCode is determined by the administrator. You can also disable it on a per post basis from the posting form. BBCode itself is similar in style to HTML: tags are enclosed in square braces [ and ] rather than < and > and it offers greater control over what and how something is displayed. For more information on BBCode see the guide which can be accessed from the posting page."); ! $faq[] = array("Can I use HTML?", "That depends on whether the administrator allows you to; they have complete control over it. If you are allowed to use it, you will probably find only certain tags work. This is a safety feature to prevent people from abusing the board by using tags which may destroy the layout or cause other problems. If HTML is enabled you can disable it on a per post basis from the posting form."); ! $faq[] = array("What are Smileys?", "Smileys, or Emoticons, are small graphical images which can be used to express some feeling using a short code, e.g. :) means happy, :( means sad. The full list of emoticons can be seen via the posting form. Try not to overuse smileys, though, as they can quickly render a post unreadable and a moderator may decide to edit them out or remove the post altogether."); ! $faq[] = array("Can I post Images?", "Images can indeed be shown in your posts. However, there is no facility at present for uploading images directly to this board. Therefore you must link to an image stored on a publicly accessible web server, e.g. http://www.some-unknown-place.net/my-picture.gif. You cannot link to pictures stored on your own PC (unless it is a publicly accessible server) nor to images stored behind authentication mechanisms such as Hotmail or Yahoo mailboxes, password-protected sites, etc. To display the image use either the BBCode [img] tag or appropriate HTML (if allowed)."); ! $faq[] = array("What are Announcements?", "Announcements often contain important information and you should read them as soon as possible. Announcements appear at the top of every page in the forum to which they are posted. Whether or not you can post an announcement depends on the permissions required, which are set by the administrator."); $faq[] = array("What are Sticky topics?", "Sticky topics appear below any announcements in viewforum and only on the first page. They are often quite important so you should read them where possible. As with announcements the board administrator determines what permissions are required to post sticky topics in each forum."); ! $faq[] = array("What are Locked topics?", "Locked topics are set this way by either the forum moderator or board administrator. You cannot reply to locked topics and any poll contained inside is automatically ended. Topics may be locked for many reasons."); $faq[] = array("--","User Levels and Groups"); ! $faq[] = array("What are Administrators?", "Administrators are people assigned the highest level of control over the entire board. These people can control all facets of board operation which include setting permissions, banning users, creating usergroups or moderators, etc. They also have full moderator capabilities in all the forums."); $faq[] = array("What are Moderators?", "Moderators are individuals (or groups of individuals) whose job it is to look after the running of the forums from day to day. They have the power to edit or delete posts and lock, unlock, move, delete and split topics in the forum they moderate. Generally moderators are there to prevent people going off-topic or posting abusive or offensive material."); $faq[] = array("What are Usergroups?", "Usergroups are a way in which board administrators can group users. Each user can belong to several groups (this differs from most other boards) and each group can be assigned individual access rights. This makes it easy for administrators to set up several users as moderators of a forum, or to give them access to a private forum, etc."); ! $faq[] = array("How do I join a Usergroup?", "To join a usergroup click the usergroup link on the page header (dependent on template design) and you can then view all usergroups. Not all groups are open access -- some are closed and some may even have hidden memberships. If the board is open then you can request to join it by clicking the appropriate button. The user group moderator will need to approve your request; they may ask why you want to join the group. Please do not pester a group moderator if they turn your request down -- they will have their reasons."); ! $faq[] = array("How do I become a Usergroup Moderator?", "Usergroups are initially created by the board administrator who also assigns a board moderator. If you are interested in creating a usergroup then your first point of contact should be the administrator, so try dropping them a private message."); $faq[] = array("--","Private Messaging"); ! $faq[] = array("I cannot send private messages!", "There are three reasons for this; you are not registered and/or not logged on, the board administrator has disabled private messaging for the entire board, or the board administrator has prevented you individually from sending messages. If it is the latter case you should try asking the administrator why."); ! $faq[] = array("I keep getting unwanted private messages!", "In the future we will be adding an ignore list to the private messaging system. For now, though, if you keep receiving unwanted private messages from someone, inform the board administrator -- they have the power to prevent a user from sending private messages at all."); ! $faq[] = array("I have received a spamming or abusive email from someone on this board!", "We are sorry to hear that. The email form feature of this board includes safeguards to try to track users who send such posts. You should email the board administrator with a full copy of the email you received and it is very important this include the headers (these list details of the user that sent the email). They can then take action."); // // These entries should remain in all languages and for all modifications // $faq[] = array("--","phpBB 2 Issues"); ! $faq[] = array("Who wrote this bulletin board?", "This software (in its unmodified form) is produced, released and is copyrighted phpBB Group. It is made available under the GNU General Public License and may be freely distributed; see link for more details"); ! $faq[] = array("Why isn't X feature available?", "This software was written by and licensed through phpBB Group. If you believe a feature needs to be added then please visit the phpbb.com website and see what the phpBB Group has to say. Please do not post feature requests to the board at phpbb.com, as the Group uses sourceforge to handle tasking of new features. Please read through the forums and see what, if any, our position may already be for features and then follow the procedure given there."); ! $faq[] = array("Whom do I contact about abusive and/or legal matters related to this board?", "You should contact the administrator of this board. If you cannot find who that is, you should first contact one of the forum moderators and ask them who you should in turn contact. If still get no response you should contact the owner of the domain (do a whois lookup) or, if this is running on a free service (e.g. yahoo, free.fr, f2s.com, etc.), the management or abuse department of that service. Please note that phpBB Group has absolutely no control and cannot in any way be held liable over how, where or by whom this board is used. It is absolutely pointless contacting phpBB Group in relation to any legal (cease and desist, liable, defamatory comment, etc.) matter not directly related to the phpbb.com website or the discrete software of phpBB itself. If you do email phpBB Group about any third party use of this software then you should expect a terse response or no response at all."); // // This ends the FAQ entries diff -crbB phpbb203/language/lang_english/lang_main.php phpbb206/language/lang_english/lang_main.php *** phpbb203/language/lang_english/lang_main.php Sun Jun 15 14:32:16 2003 --- phpbb206/language/lang_english/lang_main.php Sun Jul 20 16:37:23 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: lang_main.php,v 1.85.2.4 2002/06/23 02:47:56 dougk_ff7 Exp $ * ****************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: lang_main.php,v 1.85.2.15 2003/06/10 00:31:19 psotfx Exp $ * ****************************************************************************/ *************** *** 20,26 **** --- 20,28 ---- ***************************************************************************/ // + // CONTRIBUTORS: // Add your details here if wanted, e.g. Name, username, email address, website + // 2002-08-27 Philip M. White - fixed many grammar problems // // *************** *** 117,123 **** $lang['Admin_panel'] = 'Go to Administration Panel'; ! $lang['Board_disable'] = 'Sorry but this board is currently unavailable, please try again later'; // --- 119,125 ---- $lang['Admin_panel'] = 'Go to Administration Panel'; ! $lang['Board_disable'] = 'Sorry, but this board is currently unavailable. Please try again later.'; // *************** *** 165,171 **** // // Stats block text // ! $lang['Posted_articles_zero_total'] = 'Our users have posted a total of 0 article'; // Number of posts $lang['Posted_articles_total'] = 'Our users have posted a total of %d articles'; // Number of posts $lang['Posted_article_total'] = 'Our users have posted a total of %d article'; // Number of posts $lang['Registered_users_zero_total'] = 'We have 0 registered users'; // # registered users --- 167,173 ---- // // Stats block text // ! $lang['Posted_articles_zero_total'] = 'Our users have posted a total of 0 articles'; // Number of posts $lang['Posted_articles_total'] = 'Our users have posted a total of %d articles'; // Number of posts $lang['Posted_article_total'] = 'Our users have posted a total of %d article'; // Number of posts $lang['Registered_users_zero_total'] = 'We have 0 registered users'; // # registered users *************** *** 187,201 **** // // Login // ! $lang['Enter_password'] = 'Please enter your username and password to login'; ! $lang['Login'] = 'Login'; ! $lang['Logout'] = 'Logout'; $lang['Forgotten_password'] = 'I forgot my password'; $lang['Log_me_in'] = 'Log me on automatically each visit'; ! $lang['Error_login'] = 'You have specified an incorrect or inactive username or an invalid password'; // --- 189,203 ---- // // Login // ! $lang['Enter_password'] = 'Please enter your username and password to log in.'; ! $lang['Login'] = 'Log in'; ! $lang['Logout'] = 'Log out'; $lang['Forgotten_password'] = 'I forgot my password'; $lang['Log_me_in'] = 'Log me on automatically each visit'; ! $lang['Error_login'] = 'You have specified an incorrect or inactive username, or an invalid password.'; // *************** *** 218,225 **** // $lang['View_forum'] = 'View Forum'; ! $lang['Forum_not_exist'] = 'The forum you selected does not exist'; ! $lang['Reached_on_error'] = 'You have reached this page in error'; $lang['Display_topics'] = 'Display topics from previous'; $lang['All_Topics'] = 'All Topics'; --- 220,227 ---- // $lang['View_forum'] = 'View Forum'; ! $lang['Forum_not_exist'] = 'The forum you selected does not exist.'; ! $lang['Reached_on_error'] = 'You have reached this page in error.'; $lang['Display_topics'] = 'Display topics from previous'; $lang['All_Topics'] = 'All Topics'; *************** *** 244,250 **** $lang['Rules_vote_cannot'] = 'You cannot vote in polls in this forum'; $lang['Rules_moderate'] = 'You can %smoderate this forum%s'; // %s replaced by a href links, do not remove! ! $lang['No_topics_post_one'] = 'There are no posts in this forum
Click on the Post New Topic link on this page to post one'; // --- 246,252 ---- $lang['Rules_vote_cannot'] = 'You cannot vote in polls in this forum'; $lang['Rules_moderate'] = 'You can %smoderate this forum%s'; // %s replaced by a href links, do not remove! ! $lang['No_topics_post_one'] = 'There are no posts in this forum.
Click on the Post New Topic link on this page to post one.'; // *************** *** 271,290 **** $lang['Back_to_top'] = 'Back to top'; ! $lang['Read_profile'] = 'View users profile'; ! $lang['Send_email'] = 'Send email to user'; ! $lang['Visit_website'] = 'Visit posters website'; $lang['ICQ_status'] = 'ICQ Status'; $lang['Edit_delete_post'] = 'Edit/Delete this post'; ! $lang['View_IP'] = 'View IP of poster'; $lang['Delete_post'] = 'Delete this post'; $lang['wrote'] = 'wrote'; // proceeds the username and is followed by the quoted text $lang['Quote'] = 'Quote'; // comes before bbcode quote output. $lang['Code'] = 'Code'; // comes before bbcode code output. ! $lang['Edited_time_total'] = 'Last edited by %s on %s, edited %d time in total'; // Last edited by me on 12 Oct 2001, edited 1 time in total ! $lang['Edited_times_total'] = 'Last edited by %s on %s, edited %d times in total'; // Last edited by me on 12 Oct 2001, edited 2 times in total $lang['Lock_topic'] = 'Lock this topic'; $lang['Unlock_topic'] = 'Unlock this topic'; --- 273,292 ---- $lang['Back_to_top'] = 'Back to top'; ! $lang['Read_profile'] = 'View user\'s profile'; ! $lang['Send_email'] = 'Send e-mail to user'; ! $lang['Visit_website'] = 'Visit poster\'s website'; $lang['ICQ_status'] = 'ICQ Status'; $lang['Edit_delete_post'] = 'Edit/Delete this post'; ! $lang['View_IP'] = 'View IP address of poster'; $lang['Delete_post'] = 'Delete this post'; $lang['wrote'] = 'wrote'; // proceeds the username and is followed by the quoted text $lang['Quote'] = 'Quote'; // comes before bbcode quote output. $lang['Code'] = 'Code'; // comes before bbcode code output. ! $lang['Edited_time_total'] = 'Last edited by %s on %s; edited %d time in total'; // Last edited by me on 12 Oct 2001; edited 1 time in total ! $lang['Edited_times_total'] = 'Last edited by %s on %s; edited %d times in total'; // Last edited by me on 12 Oct 2001; edited 2 times in total $lang['Lock_topic'] = 'Lock this topic'; $lang['Unlock_topic'] = 'Unlock this topic'; *************** *** 320,347 **** $lang['Confirm_delete'] = 'Are you sure you want to delete this post?'; $lang['Confirm_delete_poll'] = 'Are you sure you want to delete this poll?'; ! $lang['Flood_Error'] = 'You cannot make another post so soon after your last, please try again in a short while'; ! $lang['Empty_subject'] = 'You must specify a subject when posting a new topic'; ! $lang['Empty_message'] = 'You must enter a message when posting'; ! $lang['Forum_locked'] = 'This forum is locked you cannot post, reply to or edit topics'; ! $lang['Topic_locked'] = 'This topic is locked you cannot edit posts or make replies'; $lang['No_post_id'] = 'You must select a post to edit'; $lang['No_topic_id'] = 'You must select a topic to reply to'; ! $lang['No_valid_mode'] = 'You can only post, reply edit or quote messages, please return and try again'; ! $lang['No_such_post'] = 'There is no such post, please return and try again'; ! $lang['Edit_own_posts'] = 'Sorry but you can only edit your own posts'; ! $lang['Delete_own_posts'] = 'Sorry but you can only delete your own posts'; ! $lang['Cannot_delete_replied'] = 'Sorry but you may not delete posts that have been replied to'; ! $lang['Cannot_delete_poll'] = 'Sorry but you cannot delete an active poll'; ! $lang['Empty_poll_title'] = 'You must enter a title for your poll'; ! $lang['To_few_poll_options'] = 'You must enter at least two poll options'; ! $lang['To_many_poll_options'] = 'You have tried to enter too many poll options'; ! $lang['Post_has_no_poll'] = 'This post has no poll'; ! $lang['Already_voted'] = 'You have already voted in this poll'; ! $lang['No_vote_option'] = 'You must specify an option when voting'; $lang['Add_poll'] = 'Add a Poll'; ! $lang['Add_poll_explain'] = 'If you do not want to add a poll to your topic leave the fields blank'; $lang['Poll_question'] = 'Poll question'; $lang['Poll_option'] = 'Poll option'; $lang['Add_option'] = 'Add option'; --- 322,349 ---- $lang['Confirm_delete'] = 'Are you sure you want to delete this post?'; $lang['Confirm_delete_poll'] = 'Are you sure you want to delete this poll?'; ! $lang['Flood_Error'] = 'You cannot make another post so soon after your last; please try again in a short while.'; ! $lang['Empty_subject'] = 'You must specify a subject when posting a new topic.'; ! $lang['Empty_message'] = 'You must enter a message when posting.'; ! $lang['Forum_locked'] = 'This forum is locked: you cannot post, reply to, or edit topics.'; ! $lang['Topic_locked'] = 'This topic is locked: you cannot edit posts or make replies.'; $lang['No_post_id'] = 'You must select a post to edit'; $lang['No_topic_id'] = 'You must select a topic to reply to'; ! $lang['No_valid_mode'] = 'You can only post, reply, edit, or quote messages. Please return and try again.'; ! $lang['No_such_post'] = 'There is no such post. Please return and try again.'; ! $lang['Edit_own_posts'] = 'Sorry, but you can only edit your own posts.'; ! $lang['Delete_own_posts'] = 'Sorry, but you can only delete your own posts.'; ! $lang['Cannot_delete_replied'] = 'Sorry, but you may not delete posts that have been replied to.'; ! $lang['Cannot_delete_poll'] = 'Sorry, but you cannot delete an active poll.'; ! $lang['Empty_poll_title'] = 'You must enter a title for your poll.'; ! $lang['To_few_poll_options'] = 'You must enter at least two poll options.'; ! $lang['To_many_poll_options'] = 'You have tried to enter too many poll options.'; ! $lang['Post_has_no_poll'] = 'This post has no poll.'; ! $lang['Already_voted'] = 'You have already voted in this poll.'; ! $lang['No_vote_option'] = 'You must specify an option when voting.'; $lang['Add_poll'] = 'Add a Poll'; ! $lang['Add_poll_explain'] = 'If you do not want to add a poll to your topic, leave the fields blank.'; $lang['Poll_question'] = 'Poll question'; $lang['Poll_option'] = 'Poll option'; $lang['Add_option'] = 'Add option'; *************** *** 349,355 **** $lang['Delete'] = 'Delete'; $lang['Poll_for'] = 'Run poll for'; $lang['Days'] = 'Days'; // This is used for the Run poll for ... Days + in admin_forums for pruning ! $lang['Poll_for_explain'] = '[ Enter 0 or leave blank for a never ending poll ]'; $lang['Delete_poll'] = 'Delete Poll'; $lang['Disable_HTML_post'] = 'Disable HTML in this post'; --- 351,357 ---- $lang['Delete'] = 'Delete'; $lang['Poll_for'] = 'Run poll for'; $lang['Days'] = 'Days'; // This is used for the Run poll for ... Days + in admin_forums for pruning ! $lang['Poll_for_explain'] = '[ Enter 0 or leave blank for a never-ending poll ]'; $lang['Delete_poll'] = 'Delete Poll'; $lang['Disable_HTML_post'] = 'Disable HTML in this post'; *************** *** 367,376 **** $lang['Notify'] = 'Notify me when a reply is posted'; $lang['Delete_post'] = 'Delete this post'; ! $lang['Stored'] = 'Your message has been entered successfully'; ! $lang['Deleted'] = 'Your message has been deleted successfully'; ! $lang['Poll_delete'] = 'Your poll has been deleted successfully'; ! $lang['Vote_cast'] = 'Your vote has been cast'; $lang['Topic_reply_notification'] = 'Topic Reply Notification'; --- 369,378 ---- $lang['Notify'] = 'Notify me when a reply is posted'; $lang['Delete_post'] = 'Delete this post'; ! $lang['Stored'] = 'Your message has been entered successfully.'; ! $lang['Deleted'] = 'Your message has been deleted successfully.'; ! $lang['Poll_delete'] = 'Your poll has been deleted successfully.'; ! $lang['Vote_cast'] = 'Your vote has been cast.'; $lang['Topic_reply_notification'] = 'Topic Reply Notification'; *************** *** 415,421 **** $lang['font_huge'] = 'Huge'; $lang['Close_Tags'] = 'Close Tags'; ! $lang['Styles_tip'] = 'Tip: Styles can be applied quickly to selected text'; // --- 417,423 ---- $lang['font_huge'] = 'Huge'; $lang['Close_Tags'] = 'Close Tags'; ! $lang['Styles_tip'] = 'Tip: Styles can be applied quickly to selected text.'; // *************** *** 423,429 **** // $lang['Private_Messaging'] = 'Private Messaging'; ! $lang['Login_check_pm'] = 'Login to check your private messages'; $lang['New_pms'] = 'You have %d new messages'; // You have 2 new messages $lang['New_pm'] = 'You have %d new message'; // You have 1 new message $lang['No_new_pm'] = 'You have no new messages'; --- 425,431 ---- // $lang['Private_Messaging'] = 'Private Messaging'; ! $lang['Login_check_pm'] = 'Log in to check your private messages'; $lang['New_pms'] = 'You have %d new messages'; // You have 2 new messages $lang['New_pm'] = 'You have %d new message'; // You have 1 new message $lang['No_new_pm'] = 'You have no new messages'; *************** *** 466,481 **** $lang['No_messages_folder'] = 'You have no messages in this folder'; ! $lang['PM_disabled'] = 'Private messaging has been disabled on this board'; ! $lang['Cannot_send_privmsg'] = 'Sorry but the administrator has prevented you from sending private messages'; ! $lang['No_to_user'] = 'You must specify a username to send this message'; ! $lang['No_such_user'] = 'Sorry but no such user exists'; $lang['Disable_HTML_pm'] = 'Disable HTML in this message'; $lang['Disable_BBCode_pm'] = 'Disable BBCode in this message'; $lang['Disable_Smilies_pm'] = 'Disable Smilies in this message'; ! $lang['Message_sent'] = 'Your message has been sent'; $lang['Click_return_inbox'] = 'Click %sHere%s to return to your Inbox'; $lang['Click_return_index'] = 'Click %sHere%s to return to the Index'; --- 468,483 ---- $lang['No_messages_folder'] = 'You have no messages in this folder'; ! $lang['PM_disabled'] = 'Private messaging has been disabled on this board.'; ! $lang['Cannot_send_privmsg'] = 'Sorry, but the administrator has prevented you from sending private messages.'; ! $lang['No_to_user'] = 'You must specify a username to whom to send this message.'; ! $lang['No_such_user'] = 'Sorry, but no such user exists.'; $lang['Disable_HTML_pm'] = 'Disable HTML in this message'; $lang['Disable_BBCode_pm'] = 'Disable BBCode in this message'; $lang['Disable_Smilies_pm'] = 'Disable Smilies in this message'; ! $lang['Message_sent'] = 'Your message has been sent.'; $lang['Click_return_inbox'] = 'Click %sHere%s to return to your Inbox'; $lang['Click_return_index'] = 'Click %sHere%s to return to the Index'; *************** *** 484,494 **** $lang['Send_a_reply'] = 'Reply to a private message'; $lang['Edit_message'] = 'Edit private message'; ! $lang['Notification_subject'] = 'New Private Message has arrived'; $lang['Find_username'] = 'Find a username'; $lang['Find'] = 'Find'; ! $lang['No_match'] = 'No matches found'; $lang['No_post_id'] = 'No post ID was specified'; $lang['No_such_folder'] = 'No such folder exists'; --- 486,496 ---- $lang['Send_a_reply'] = 'Reply to a private message'; $lang['Edit_message'] = 'Edit private message'; ! $lang['Notification_subject'] = 'New Private Message has arrived!'; $lang['Find_username'] = 'Find a username'; $lang['Find'] = 'Find'; ! $lang['No_match'] = 'No matches found.'; $lang['No_post_id'] = 'No post ID was specified'; $lang['No_such_folder'] = 'No such folder exists'; *************** *** 514,520 **** $lang['About_user'] = 'All about %s'; // %s is username $lang['Preferences'] = 'Preferences'; ! $lang['Items_required'] = 'Items marked with a * are required unless stated otherwise'; $lang['Registration_info'] = 'Registration Information'; $lang['Profile_info'] = 'Profile Information'; $lang['Profile_info_warn'] = 'This information will be publicly viewable'; --- 516,522 ---- $lang['About_user'] = 'All about %s'; // %s is username $lang['Preferences'] = 'Preferences'; ! $lang['Items_required'] = 'Items marked with a * are required unless stated otherwise.'; $lang['Registration_info'] = 'Registration Information'; $lang['Profile_info'] = 'Profile Information'; $lang['Profile_info_warn'] = 'This information will be publicly viewable'; *************** *** 524,531 **** $lang['Website'] = 'Website'; $lang['Location'] = 'Location'; $lang['Contact'] = 'Contact'; ! $lang['Email_address'] = 'Email address'; ! $lang['Email'] = 'Email'; $lang['Send_private_message'] = 'Send private message'; $lang['Hidden_email'] = '[ Hidden ]'; $lang['Search_user_posts'] = 'Search for posts by this user'; --- 526,533 ---- $lang['Website'] = 'Website'; $lang['Location'] = 'Location'; $lang['Contact'] = 'Contact'; ! $lang['Email_address'] = 'E-mail address'; ! $lang['Email'] = 'E-mail'; $lang['Send_private_message'] = 'Send private message'; $lang['Hidden_email'] = '[ Hidden ]'; $lang['Search_user_posts'] = 'Search for posts by this user'; *************** *** 538,544 **** $lang['User_post_day_stats'] = '%.2f posts per day'; // 1.5 posts per day $lang['Search_user_posts'] = 'Find all posts by %s'; // Find all posts by username ! $lang['No_user_id_specified'] = 'Sorry but that user does not exist'; $lang['Wrong_Profile'] = 'You cannot modify a profile that is not your own.'; $lang['Only_one_avatar'] = 'Only one type of avatar can be specified'; --- 540,546 ---- $lang['User_post_day_stats'] = '%.2f posts per day'; // 1.5 posts per day $lang['Search_user_posts'] = 'Find all posts by %s'; // Find all posts by username ! $lang['No_user_id_specified'] = 'Sorry, but that user does not exist.'; $lang['Wrong_Profile'] = 'You cannot modify a profile that is not your own.'; $lang['Only_one_avatar'] = 'Only one type of avatar can be specified'; *************** *** 546,579 **** $lang['No_connection_URL'] = 'A connection could not be made to the URL you gave'; $lang['Incomplete_URL'] = 'The URL you entered is incomplete'; $lang['Wrong_remote_avatar_format'] = 'The URL of the remote avatar is not valid'; ! $lang['No_send_account_inactive'] = 'Sorry, but your password cannot be retrieved because your account is currently inactive. Please contact the forum administrator for more information'; $lang['Always_smile'] = 'Always enable Smilies'; $lang['Always_html'] = 'Always allow HTML'; $lang['Always_bbcode'] = 'Always allow BBCode'; $lang['Always_add_sig'] = 'Always attach my signature'; $lang['Always_notify'] = 'Always notify me of replies'; ! $lang['Always_notify_explain'] = 'Sends an email when someone replies to a topic you have posted in. This can be changed whenever you post'; $lang['Board_style'] = 'Board Style'; $lang['Board_lang'] = 'Board Language'; $lang['No_themes'] = 'No Themes In database'; $lang['Timezone'] = 'Timezone'; $lang['Date_format'] = 'Date format'; ! $lang['Date_format_explain'] = 'The syntax used is identical to the PHP date() function'; $lang['Signature'] = 'Signature'; $lang['Signature_explain'] = 'This is a block of text that can be added to posts you make. There is a %d character limit'; ! $lang['Public_view_email'] = 'Always show my Email Address'; $lang['Current_password'] = 'Current password'; $lang['New_password'] = 'New password'; $lang['Confirm_password'] = 'Confirm password'; ! $lang['Confirm_password_explain'] = 'You must confirm your current password if you wish to change it or alter your email address'; $lang['password_if_changed'] = 'You only need to supply a password if you want to change it'; $lang['password_confirm_if_changed'] = 'You only need to confirm your password if you changed it above'; $lang['Avatar'] = 'Avatar'; ! $lang['Avatar_explain'] = 'Displays a small graphic image below your details in posts. Only one image can be displayed at a time, its width can be no greater than %d pixels, a height no greater than %d pixels and a file size no more than %dkB.'; $lang['Upload_Avatar_file'] = 'Upload Avatar from your machine'; $lang['Upload_Avatar_URL'] = 'Upload Avatar from a URL'; $lang['Upload_Avatar_URL_explain'] = 'Enter the URL of the location containing the Avatar image, it will be copied to this site.'; $lang['Pick_local_Avatar'] = 'Select Avatar from the gallery'; --- 548,582 ---- $lang['No_connection_URL'] = 'A connection could not be made to the URL you gave'; $lang['Incomplete_URL'] = 'The URL you entered is incomplete'; $lang['Wrong_remote_avatar_format'] = 'The URL of the remote avatar is not valid'; ! $lang['No_send_account_inactive'] = 'Sorry, but your password cannot be retrieved because your account is currently inactive. Please contact the forum administrator for more information.'; $lang['Always_smile'] = 'Always enable Smilies'; $lang['Always_html'] = 'Always allow HTML'; $lang['Always_bbcode'] = 'Always allow BBCode'; $lang['Always_add_sig'] = 'Always attach my signature'; $lang['Always_notify'] = 'Always notify me of replies'; ! $lang['Always_notify_explain'] = 'Sends an e-mail when someone replies to a topic you have posted in. This can be changed whenever you post.'; $lang['Board_style'] = 'Board Style'; $lang['Board_lang'] = 'Board Language'; $lang['No_themes'] = 'No Themes In database'; $lang['Timezone'] = 'Timezone'; $lang['Date_format'] = 'Date format'; ! $lang['Date_format_explain'] = 'The syntax used is identical to the PHP date() function.'; $lang['Signature'] = 'Signature'; $lang['Signature_explain'] = 'This is a block of text that can be added to posts you make. There is a %d character limit'; ! $lang['Public_view_email'] = 'Always show my e-mail address'; $lang['Current_password'] = 'Current password'; $lang['New_password'] = 'New password'; $lang['Confirm_password'] = 'Confirm password'; ! $lang['Confirm_password_explain'] = 'You must confirm your current password if you wish to change it or alter your e-mail address'; $lang['password_if_changed'] = 'You only need to supply a password if you want to change it'; $lang['password_confirm_if_changed'] = 'You only need to confirm your password if you changed it above'; $lang['Avatar'] = 'Avatar'; ! $lang['Avatar_explain'] = 'Displays a small graphic image below your details in posts. Only one image can be displayed at a time, its width can be no greater than %d pixels, the height no greater than %d pixels, and the file size no more than %d KB.'; ! $lang['Upload_Avatar_file'] = 'Upload Avatar from your machine'; $lang['Upload_Avatar_URL'] = 'Upload Avatar from a URL'; $lang['Upload_Avatar_URL_explain'] = 'Enter the URL of the location containing the Avatar image, it will be copied to this site.'; $lang['Pick_local_Avatar'] = 'Select Avatar from the gallery'; *************** *** 592,657 **** $lang['Notify_on_privmsg'] = 'Notify on new Private Message'; $lang['Popup_on_privmsg'] = 'Pop up window on new Private Message'; ! $lang['Popup_on_privmsg_explain'] = 'Some templates may open a new window to inform you when new private messages arrive'; $lang['Hide_user'] = 'Hide your online status'; $lang['Profile_updated'] = 'Your profile has been updated'; ! $lang['Profile_updated_inactive'] = 'Your profile has been updated, however you have changed vital details thus your account is now inactive. Check your email to find out how to reactivate your account, or if admin activation is require wait for the administrator to reactivate your account'; ! $lang['Password_mismatch'] = 'The passwords you entered did not match'; ! $lang['Current_password_mismatch'] = 'The current password you supplied does not match that stored in the database'; ! $lang['Password_long'] = 'Your password must be no more than 32 characters'; ! $lang['Username_taken'] = 'Sorry but this username has already been taken'; ! $lang['Username_invalid'] = 'Sorry but this username contains an invalid character such as \''; ! $lang['Username_disallowed'] = 'Sorry but this username has been disallowed'; ! $lang['Email_taken'] = 'Sorry but that email address is already registered to a user'; ! $lang['Email_banned'] = 'Sorry but this email address has been banned'; ! $lang['Email_invalid'] = 'Sorry but this email address is invalid'; ! $lang['Signature_too_long'] = 'Your signature is too long'; ! $lang['Fields_empty'] = 'You must fill in the required fields'; $lang['Avatar_filetype'] = 'The avatar filetype must be .jpg, .gif or .png'; ! $lang['Avatar_filesize'] = 'The avatar image file size must be less than %d kB'; // The avatar image file size must be less than 6 kB $lang['Avatar_imagesize'] = 'The avatar must be less than %d pixels wide and %d pixels high'; $lang['Welcome_subject'] = 'Welcome to %s Forums'; // Welcome to my.com forums $lang['New_account_subject'] = 'New user account'; $lang['Account_activated_subject'] = 'Account Activated'; ! $lang['Account_added'] = 'Thank you for registering, your account has been created. You may now login with your username and password'; ! $lang['Account_inactive'] = 'Your account has been created. However, this forum requires account activation, an activation key has been sent to the email address you provided. Please check your email for further information'; ! $lang['Account_inactive_admin'] = 'Your account has been created. However, this forum requires account activation by the administrator. An email has been sent to them and you will be informed when your account has been activated'; $lang['Account_active'] = 'Your account has now been activated. Thank you for registering'; $lang['Account_active_admin'] = 'The account has now been activated'; $lang['Reactivate'] = 'Reactivate your account!'; $lang['Already_activated'] = 'You have already activated your account'; ! $lang['COPPA'] = 'Your account has been created but has to be approved, please check your email for details.'; $lang['Registration'] = 'Registration Agreement Terms'; ! $lang['Reg_agreement'] = 'While the administrators and moderators of this forum will attempt to remove or edit any generally objectionable material as quickly as possible, it is impossible to review every message. Therefore you acknowledge that all posts made to these forums express the views and opinions of the author and not the administrators, moderators or webmaster (except for posts by these people) and hence will not be held liable.

You agree not to post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-orientated or any other material that may violate any applicable laws. Doing so may lead to you being immediately and permanently banned (and your service provider being informed). The IP address of all posts is recorded to aid in enforcing these conditions. You agree that the webmaster, administrator and moderators of this forum have the right to remove, edit, move or close any topic at any time should they see fit. As a user you agree to any information you have entered above being stored in a database. While this information will not be disclosed to any third party without your consent the webmaster, administrator and moderators cannot be held responsible for any hacking attempt that may lead to the data being compromised.

This forum system uses cookies to store information on your local computer. These cookies do not contain any of the information you have entered above, they serve only to improve your viewing pleasure. The email address is used only for confirming your registration details and password (and for sending new passwords should you forget your current one).

By clicking Register below you agree to be bound by these conditions.'; $lang['Agree_under_13'] = 'I Agree to these terms and am under 13 years of age'; $lang['Agree_over_13'] = 'I Agree to these terms and am over or exactly 13 years of age'; $lang['Agree_not'] = 'I do not agree to these terms'; ! $lang['Wrong_activation'] = 'The activation key you supplied does not match any in the database'; $lang['Send_password'] = 'Send me a new password'; ! $lang['Password_updated'] = 'A new password has been created, please check your email for details on how to activate it'; ! $lang['No_email_match'] = 'The email address you supplied does not match the one listed for that username'; $lang['New_password_activation'] = 'New password activation'; ! $lang['Password_activated'] = 'Your account has been re-activated. To logon please use the password supplied in the email you received'; ! $lang['Send_email_msg'] = 'Send an email message'; $lang['No_user_specified'] = 'No user was specified'; ! $lang['User_prevent_email'] = 'This user does not wish to receive email. Try sending them a private message'; $lang['User_not_exist'] = 'That user does not exist'; ! $lang['CC_email'] = 'Send a copy of this email to yourself'; ! $lang['Email_message_desc'] = 'This message will be sent as plain text, do not include any HTML or BBCode. The return address for this message will be set to your email address.'; ! $lang['Flood_email_limit'] = 'You cannot send another email at this time, try again later'; $lang['Recipient'] = 'Recipient'; ! $lang['Email_sent'] = 'The email has been sent'; ! $lang['Send_email'] = 'Send email'; ! $lang['Empty_subject_email'] = 'You must specify a subject for the email'; ! $lang['Empty_message_email'] = 'You must enter a message to be emailed'; // --- 595,672 ---- $lang['Notify_on_privmsg'] = 'Notify on new Private Message'; $lang['Popup_on_privmsg'] = 'Pop up window on new Private Message'; ! $lang['Popup_on_privmsg_explain'] = 'Some templates may open a new window to inform you when new private messages arrive.'; $lang['Hide_user'] = 'Hide your online status'; $lang['Profile_updated'] = 'Your profile has been updated'; ! $lang['Profile_updated_inactive'] = 'Your profile has been updated. However, you have changed vital details, thus your account is now inactive. Check your e-mail to find out how to reactivate your account, or if admin activation is required, wait for the administrator to reactivate it.'; ! $lang['Password_mismatch'] = 'The passwords you entered did not match.'; ! $lang['Current_password_mismatch'] = 'The current password you supplied does not match that stored in the database.'; ! $lang['Password_long'] = 'Your password must be no more than 32 characters.'; ! $lang['Too_many_registers'] = 'You have made too many registration attempts. Please try again later.'; ! $lang['Username_taken'] = 'Sorry, but this username has already been taken.'; ! $lang['Username_invalid'] = 'Sorry, but this username contains an invalid character such as \'.'; ! $lang['Username_disallowed'] = 'Sorry, but this username has been disallowed.'; ! $lang['Email_taken'] = 'Sorry, but that e-mail address is already registered to a user.'; ! $lang['Email_banned'] = 'Sorry, but this e-mail address has been banned.'; ! $lang['Email_invalid'] = 'Sorry, but this e-mail address is invalid.'; ! $lang['Signature_too_long'] = 'Your signature is too long.'; ! $lang['Fields_empty'] = 'You must fill in the required fields.'; $lang['Avatar_filetype'] = 'The avatar filetype must be .jpg, .gif or .png'; ! $lang['Avatar_filesize'] = 'The avatar image file size must be less than %d KB'; // The avatar image file size must be less than 6 KB $lang['Avatar_imagesize'] = 'The avatar must be less than %d pixels wide and %d pixels high'; $lang['Welcome_subject'] = 'Welcome to %s Forums'; // Welcome to my.com forums $lang['New_account_subject'] = 'New user account'; $lang['Account_activated_subject'] = 'Account Activated'; ! $lang['Account_added'] = 'Thank you for registering. Your account has been created. You may now log in with your username and password'; ! $lang['Account_inactive'] = 'Your account has been created. However, this forum requires account activation. An activation key has been sent to the e-mail address you provided. Please check your e-mail for further information'; ! $lang['Account_inactive_admin'] = 'Your account has been created. However, this forum requires account activation by the administrator. An e-mail has been sent to them and you will be informed when your account has been activated'; $lang['Account_active'] = 'Your account has now been activated. Thank you for registering'; $lang['Account_active_admin'] = 'The account has now been activated'; $lang['Reactivate'] = 'Reactivate your account!'; $lang['Already_activated'] = 'You have already activated your account'; ! $lang['COPPA'] = 'Your account has been created but has to be approved. Please check your e-mail for details.'; $lang['Registration'] = 'Registration Agreement Terms'; ! $lang['Reg_agreement'] = 'While the administrators and moderators of this forum will attempt to remove or edit any generally objectionable material as quickly as possible, it is impossible to review every message. Therefore you acknowledge that all posts made to these forums express the views and opinions of the author and not the administrators, moderators or webmaster (except for posts by these people) and hence will not be held liable.

You agree not to post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-oriented or any other material that may violate any applicable laws. Doing so may lead to you being immediately and permanently banned (and your service provider being informed). The IP address of all posts is recorded to aid in enforcing these conditions. You agree that the webmaster, administrator and moderators of this forum have the right to remove, edit, move or close any topic at any time should they see fit. As a user you agree to any information you have entered above being stored in a database. While this information will not be disclosed to any third party without your consent the webmaster, administrator and moderators cannot be held responsible for any hacking attempt that may lead to the data being compromised.

This forum system uses cookies to store information on your local computer. These cookies do not contain any of the information you have entered above; they serve only to improve your viewing pleasure. The e-mail address is used only for confirming your registration details and password (and for sending new passwords should you forget your current one).

By clicking Register below you agree to be bound by these conditions.'; $lang['Agree_under_13'] = 'I Agree to these terms and am under 13 years of age'; $lang['Agree_over_13'] = 'I Agree to these terms and am over or exactly 13 years of age'; $lang['Agree_not'] = 'I do not agree to these terms'; ! $lang['Wrong_activation'] = 'The activation key you supplied does not match any in the database.'; $lang['Send_password'] = 'Send me a new password'; ! $lang['Password_updated'] = 'A new password has been created; please check your e-mail for details on how to activate it.'; ! $lang['No_email_match'] = 'The e-mail address you supplied does not match the one listed for that username.'; $lang['New_password_activation'] = 'New password activation'; ! $lang['Password_activated'] = 'Your account has been re-activated. To log in, please use the password supplied in the e-mail you received.'; ! $lang['Send_email_msg'] = 'Send an e-mail message'; $lang['No_user_specified'] = 'No user was specified'; ! $lang['User_prevent_email'] = 'This user does not wish to receive e-mail. Try sending them a private message.'; $lang['User_not_exist'] = 'That user does not exist'; ! $lang['CC_email'] = 'Send a copy of this e-mail to yourself'; ! $lang['Email_message_desc'] = 'This message will be sent as plain text, so do not include any HTML or BBCode. The return address for this message will be set to your e-mail address.'; ! $lang['Flood_email_limit'] = 'You cannot send another e-mail at this time. Try again later.'; $lang['Recipient'] = 'Recipient'; ! $lang['Email_sent'] = 'The e-mail has been sent.'; ! $lang['Send_email'] = 'Send e-mail'; ! $lang['Empty_subject_email'] = 'You must specify a subject for the e-mail.'; ! $lang['Empty_message_email'] = 'You must enter a message to be e-mailed.'; ! ! ! // ! // Visual confirmation system strings ! // ! $lang['Confirm_code_wrong'] = 'The confirmation code you entered was incorrect'; ! $lang['Too_many_registers'] = 'You have exceeded the number of registration attempts for this session. Please try again later.'; ! $lang['Confirm_code_impaired'] = 'If you are visually impaired or cannot otherwise read this code please contact the %sAdministrator%s for help.'; ! $lang['Confirm_code'] = 'Confirmation code'; ! $lang['Confirm_code_explain'] = 'Enter the code exactly as you see it. The code is case sensitive and zero has a diagonal line through it.'; ! // *************** *** 700,720 **** $lang['Join_group'] = 'Join Group'; $lang['No_group_members'] = 'This group has no members'; ! $lang['Group_hidden_members'] = 'This group is hidden, you cannot view its membership'; $lang['No_pending_group_members'] = 'This group has no pending members'; ! $lang['Group_joined'] = 'You have successfully subscribed to this group
You will be notified when your subscription is approved by the group moderator'; ! $lang['Group_request'] = 'A request to join your group has been made'; ! $lang['Group_approved'] = 'Your request has been approved'; ! $lang['Group_added'] = 'You have been added to this usergroup'; $lang['Already_member_group'] = 'You are already a member of this group'; $lang['User_is_member_group'] = 'User is already a member of this group'; ! $lang['Group_type_updated'] = 'Successfully updated group type'; ! $lang['Could_not_add_user'] = 'The user you selected does not exist'; ! $lang['Could_not_anon_user'] = 'You cannot make Anonymous a group member'; $lang['Confirm_unsub'] = 'Are you sure you want to unsubscribe from this group?'; ! $lang['Confirm_unsub_pending'] = 'Your subscription to this group has not yet been approved, are you sure you want to unsubscribe?'; $lang['Unsub_success'] = 'You have been un-subscribed from this group.'; --- 715,735 ---- $lang['Join_group'] = 'Join Group'; $lang['No_group_members'] = 'This group has no members'; ! $lang['Group_hidden_members'] = 'This group is hidden; you cannot view its membership'; $lang['No_pending_group_members'] = 'This group has no pending members'; ! $lang['Group_joined'] = 'You have successfully subscribed to this group.
You will be notified when your subscription is approved by the group moderator.'; ! $lang['Group_request'] = 'A request to join your group has been made.'; ! $lang['Group_approved'] = 'Your request has been approved.'; ! $lang['Group_added'] = 'You have been added to this usergroup.'; $lang['Already_member_group'] = 'You are already a member of this group'; $lang['User_is_member_group'] = 'User is already a member of this group'; ! $lang['Group_type_updated'] = 'Successfully updated group type.'; ! $lang['Could_not_add_user'] = 'The user you selected does not exist.'; ! $lang['Could_not_anon_user'] = 'You cannot make Anonymous a group member.'; $lang['Confirm_unsub'] = 'Are you sure you want to unsubscribe from this group?'; ! $lang['Confirm_unsub_pending'] = 'Your subscription to this group has not yet been approved; are you sure you want to unsubscribe?'; $lang['Unsub_success'] = 'You have been un-subscribed from this group.'; *************** *** 723,734 **** $lang['Not_logged_in'] = 'You must be logged in to join a group.'; $lang['Remove_selected'] = 'Remove Selected'; $lang['Add_member'] = 'Add Member'; ! $lang['Not_group_moderator'] = 'You are not this groups moderator therefor you cannot preform that action.'; ! $lang['Login_to_join'] = 'Login to join or manage group memberships'; ! $lang['This_open_group'] = 'This is an open group, click to request membership'; ! $lang['This_closed_group'] = 'This is a closed group, no more users accepted'; ! $lang['This_hidden_group'] = 'This is a hidden group, automatic user addition is not allowed'; $lang['Member_this_group'] = 'You are a member of this group'; $lang['Pending_this_group'] = 'Your membership of this group is pending'; $lang['Are_group_moderator'] = 'You are the group moderator'; --- 738,749 ---- $lang['Not_logged_in'] = 'You must be logged in to join a group.'; $lang['Remove_selected'] = 'Remove Selected'; $lang['Add_member'] = 'Add Member'; ! $lang['Not_group_moderator'] = 'You are not this group\'s moderator, therefore you cannot perform that action.'; ! $lang['Login_to_join'] = 'Log in to join or manage group memberships'; ! $lang['This_open_group'] = 'This is an open group: click to request membership'; ! $lang['This_closed_group'] = 'This is a closed group: no more users accepted'; ! $lang['This_hidden_group'] = 'This is a hidden group: automatic user addition is not allowed'; $lang['Member_this_group'] = 'You are a member of this group'; $lang['Pending_this_group'] = 'Your membership of this group is pending'; $lang['Are_group_moderator'] = 'You are the group moderator'; *************** *** 769,775 **** $lang['Display_results'] = 'Display results as'; $lang['All_available'] = 'All available'; ! $lang['No_searchable_forums'] = 'You do not have permissions to search any forum on this site'; $lang['No_search_match'] = 'No topics or posts met your search criteria'; $lang['Found_search_match'] = 'Search found %d match'; // eg. Search found 1 match --- 784,790 ---- $lang['Display_results'] = 'Display results as'; $lang['All_available'] = 'All available'; ! $lang['No_searchable_forums'] = 'You do not have permissions to search any forum on this site.'; $lang['No_search_match'] = 'No topics or posts met your search criteria'; $lang['Found_search_match'] = 'Search found %d match'; // eg. Search found 1 match *************** *** 782,795 **** // Auth related entries // // Note the %s will be replaced with one of the following 'user' arrays ! $lang['Sorry_auth_announce'] = 'Sorry but only %s can post announcements in this forum'; ! $lang['Sorry_auth_sticky'] = 'Sorry but only %s can post sticky messages in this forum'; ! $lang['Sorry_auth_read'] = 'Sorry but only %s can read topics in this forum'; ! $lang['Sorry_auth_post'] = 'Sorry but only %s can post topics in this forum'; ! $lang['Sorry_auth_reply'] = 'Sorry but only %s can reply to posts in this forum'; ! $lang['Sorry_auth_edit'] = 'Sorry but only %s can edit posts in this forum'; ! $lang['Sorry_auth_delete'] = 'Sorry but only %s can delete posts in this forum'; ! $lang['Sorry_auth_vote'] = 'Sorry but only %s can vote in polls in this forum'; // These replace the %s in the above strings $lang['Auth_Anonymous_Users'] = 'anonymous users'; --- 797,810 ---- // Auth related entries // // Note the %s will be replaced with one of the following 'user' arrays ! $lang['Sorry_auth_announce'] = 'Sorry, but only %s can post announcements in this forum.'; ! $lang['Sorry_auth_sticky'] = 'Sorry, but only %s can post sticky messages in this forum.'; ! $lang['Sorry_auth_read'] = 'Sorry, but only %s can read topics in this forum.'; ! $lang['Sorry_auth_post'] = 'Sorry, but only %s can post topics in this forum.'; ! $lang['Sorry_auth_reply'] = 'Sorry, but only %s can reply to posts in this forum.'; ! $lang['Sorry_auth_edit'] = 'Sorry, but only %s can edit posts in this forum.'; ! $lang['Sorry_auth_delete'] = 'Sorry, but only %s can delete posts in this forum.'; ! $lang['Sorry_auth_vote'] = 'Sorry, but only %s can vote in polls in this forum.'; // These replace the %s in the above strings $lang['Auth_Anonymous_Users'] = 'anonymous users'; *************** *** 798,815 **** $lang['Auth_Moderators'] = 'moderators'; $lang['Auth_Administrators'] = 'administrators'; ! $lang['Not_Moderator'] = 'You are not a moderator of this forum'; $lang['Not_Authorised'] = 'Not Authorised'; ! $lang['You_been_banned'] = 'You have been banned from this forum
Please contact the webmaster or board administrator for more information'; // // Viewonline // ! $lang['Reg_users_zero_online'] = 'There are 0 Registered users and '; // There ae 5 Registered and ! $lang['Reg_users_online'] = 'There are %d Registered users and '; // There ae 5 Registered and ! $lang['Reg_user_online'] = 'There is %d Registered user and '; // There ae 5 Registered and $lang['Hidden_users_zero_online'] = '0 Hidden users online'; // 6 Hidden users online $lang['Hidden_users_online'] = '%d Hidden users online'; // 6 Hidden users online $lang['Hidden_user_online'] = '%d Hidden user online'; // 6 Hidden users online --- 813,830 ---- $lang['Auth_Moderators'] = 'moderators'; $lang['Auth_Administrators'] = 'administrators'; ! $lang['Not_Moderator'] = 'You are not a moderator of this forum.'; $lang['Not_Authorised'] = 'Not Authorised'; ! $lang['You_been_banned'] = 'You have been banned from this forum.
Please contact the webmaster or board administrator for more information.'; // // Viewonline // ! $lang['Reg_users_zero_online'] = 'There are 0 Registered users and '; // There are 5 Registered and ! $lang['Reg_users_online'] = 'There are %d Registered users and '; // There are 5 Registered and ! $lang['Reg_user_online'] = 'There is %d Registered user and '; // There is 1 Registered and $lang['Hidden_users_zero_online'] = '0 Hidden users online'; // 6 Hidden users online $lang['Hidden_users_online'] = '%d Hidden users online'; // 6 Hidden users online $lang['Hidden_user_online'] = '%d Hidden user online'; // 6 Hidden users online *************** *** 847,856 **** $lang['Unlock'] = 'Unlock'; $lang['Topics_Removed'] = 'The selected topics have been successfully removed from the database.'; ! $lang['Topics_Locked'] = 'The selected topics have been locked'; ! $lang['Topics_Moved'] = 'The selected topics have been moved'; ! $lang['Topics_Unlocked'] = 'The selected topics have been unlocked'; ! $lang['No_Topics_Moved'] = 'No topics were moved'; $lang['Confirm_delete_topic'] = 'Are you sure you want to remove the selected topic/s?'; $lang['Confirm_lock_topic'] = 'Are you sure you want to lock the selected topic/s?'; --- 862,871 ---- $lang['Unlock'] = 'Unlock'; $lang['Topics_Removed'] = 'The selected topics have been successfully removed from the database.'; ! $lang['Topics_Locked'] = 'The selected topics have been locked.'; ! $lang['Topics_Moved'] = 'The selected topics have been moved.'; ! $lang['Topics_Unlocked'] = 'The selected topics have been unlocked.'; ! $lang['No_Topics_Moved'] = 'No topics were moved.'; $lang['Confirm_delete_topic'] = 'Are you sure you want to remove the selected topic/s?'; $lang['Confirm_lock_topic'] = 'Are you sure you want to lock the selected topic/s?'; *************** *** 870,883 **** $lang['Too_many_error'] = 'You have selected too many posts. You can only select one post to split a topic after!'; ! $lang['None_selected'] = 'You have no selected any topics to preform this operation on. Please go back and select at least one.'; $lang['New_forum'] = 'New forum'; ! $lang['This_posts_IP'] = 'IP for this post'; $lang['Other_IP_this_user'] = 'Other IP addresses this user has posted from'; ! $lang['Users_this_IP'] = 'Users posting from this IP'; $lang['IP_info'] = 'IP Information'; ! $lang['Lookup_IP'] = 'Look up IP'; // --- 885,898 ---- $lang['Too_many_error'] = 'You have selected too many posts. You can only select one post to split a topic after!'; ! $lang['None_selected'] = 'You have not selected any topics to perform this operation on. Please go back and select at least one.'; $lang['New_forum'] = 'New forum'; ! $lang['This_posts_IP'] = 'IP address for this post'; $lang['Other_IP_this_user'] = 'Other IP addresses this user has posted from'; ! $lang['Users_this_IP'] = 'Users posting from this IP address'; $lang['IP_info'] = 'IP Information'; ! $lang['Lookup_IP'] = 'Look up IP address'; // *************** *** 916,921 **** --- 931,937 ---- $lang['10'] = 'GMT + 10 Hours'; $lang['11'] = 'GMT + 11 Hours'; $lang['12'] = 'GMT + 12 Hours'; + $lang['13'] = 'GMT + 13 Hours'; // These are displayed in the timezone select box $lang['tz']['-12'] = 'GMT - 12 Hours'; *************** *** 949,954 **** --- 965,971 ---- $lang['tz']['10'] = 'GMT + 10 Hours'; $lang['tz']['11'] = 'GMT + 11 Hours'; $lang['tz']['12'] = 'GMT + 12 Hours'; + $lang['tz']['13'] = 'GMT + 13 Hours'; $lang['datetime']['Sunday'] = 'Sunday'; $lang['datetime']['Monday'] = 'Monday'; *************** *** 1002,1008 **** $lang['A_critical_error'] = 'A Critical Error Occurred'; // ! // That's all Folks! // ------------------------------------------------- ?> --- 1019,1025 ---- $lang['A_critical_error'] = 'A Critical Error Occurred'; // ! // That's all, Folks! // ------------------------------------------------- ?> \ No newline at end of file diff -crbB phpbb203/login.php phpbb206/login.php *** phpbb203/login.php Sun Jun 15 14:32:15 2003 --- phpbb206/login.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: login.php,v 1.47.2.3 2002/09/20 11:40:38 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: login.php,v 1.47.2.13 2003/06/20 07:40:27 acydburn Exp $ * * ***************************************************************************/ *************** *** 40,62 **** // End session management // ! $header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: '; if( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) || isset($HTTP_POST_VARS['logout']) || isset($HTTP_GET_VARS['logout']) ) { - // - // This appears to work for IIS5 CGI under Win2K. Uses getenv - // since this doesn't exist for ISAPI mode and therefore the - // normal Location redirector is used in preference - // if( ( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) ) && !$userdata['session_logged_in'] ) { ! $username = isset($HTTP_POST_VARS['username']) ? $HTTP_POST_VARS['username'] : ''; $password = isset($HTTP_POST_VARS['password']) ? $HTTP_POST_VARS['password'] : ''; $sql = "SELECT user_id, username, user_password, user_active, user_level FROM " . USERS_TABLE . " ! WHERE username = '" . str_replace("\'", "''", $username) . "'"; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Error in obtaining userdata', '', __LINE__, __FILE__, $sql); --- 40,67 ---- // End session management // ! // session id check ! if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid'])) ! { ! $sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid']; ! } ! else ! { ! $sid = ''; ! } if( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) || isset($HTTP_POST_VARS['logout']) || isset($HTTP_GET_VARS['logout']) ) { if( ( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) ) && !$userdata['session_logged_in'] ) { ! $username = isset($HTTP_POST_VARS['username']) ? trim(htmlspecialchars($HTTP_POST_VARS['username'])) : ''; ! $username = substr(str_replace("\\'", "'", $username), 0, 25); ! $username = str_replace("'", "\\'", $username); $password = isset($HTTP_POST_VARS['password']) ? $HTTP_POST_VARS['password'] : ''; $sql = "SELECT user_id, username, user_password, user_active, user_level FROM " . USERS_TABLE . " ! WHERE username = '" . str_replace("\\'", "''", $username) . "'"; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Error in obtaining userdata', '', __LINE__, __FILE__, $sql); *************** *** 66,73 **** { if( $row['user_level'] != ADMIN && $board_config['board_disable'] ) { ! header($header_location . append_sid("index.$phpEx", true)); ! exit; } else { --- 71,77 ---- { if( $row['user_level'] != ADMIN && $board_config['board_disable'] ) { ! redirect(append_sid("index.$phpEx", true)); } else { *************** *** 79,94 **** if( $session_id ) { ! if( !empty($HTTP_POST_VARS['redirect']) ) ! { ! header($header_location . append_sid($HTTP_POST_VARS['redirect'], true)); ! exit; ! } ! else ! { ! header($header_location . append_sid("index.$phpEx", true)); ! exit; ! } } else { --- 83,90 ---- if( $session_id ) { ! $url = ( !empty($HTTP_POST_VARS['redirect']) ) ? $HTTP_POST_VARS['redirect'] : "index.$phpEx"; ! redirect(append_sid($url, true)); } else { *************** *** 98,110 **** else { $redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? $HTTP_POST_VARS['redirect'] : ''; ! $redirect = str_replace("?", "&", $redirect); $template->assign_vars(array( ! 'META' => '') ); ! $message = $lang['Error_login'] . '

' . sprintf($lang['Click_return_login'], '', '') . '

' . sprintf($lang['Click_return_index'], '', ''); message_die(GENERAL_MESSAGE, $message); } --- 94,106 ---- else { $redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? $HTTP_POST_VARS['redirect'] : ''; ! $redirect = str_replace('?', '&', $redirect); $template->assign_vars(array( ! 'META' => "") ); ! $message = $lang['Error_login'] . '

' . sprintf($lang['Click_return_login'], "", '') . '

' . sprintf($lang['Click_return_index'], '', ''); message_die(GENERAL_MESSAGE, $message); } *************** *** 116,125 **** $redirect = str_replace("?", "&", $redirect); $template->assign_vars(array( ! 'META' => '') ); ! $message = $lang['Error_login'] . '

' . sprintf($lang['Click_return_login'], '', '') . '

' . sprintf($lang['Click_return_index'], '', ''); message_die(GENERAL_MESSAGE, $message); } --- 112,121 ---- $redirect = str_replace("?", "&", $redirect); $template->assign_vars(array( ! 'META' => "") ); ! $message = $lang['Error_login'] . '

' . sprintf($lang['Click_return_login'], "", '') . '

' . sprintf($lang['Click_return_index'], '', ''); message_die(GENERAL_MESSAGE, $message); } *************** *** 131,159 **** session_end($userdata['session_id'], $userdata['user_id']); } ! if( !empty($HTTP_POST_VARS['redirect']) ) { ! header($header_location . append_sid($HTTP_POST_VARS['redirect'], true)); ! exit; } else { ! header($header_location . append_sid("index.$phpEx", true)); ! exit; } } else { ! if( !empty($HTTP_POST_VARS['redirect']) ) ! { ! header($header_location . append_sid($HTTP_POST_VARS['redirect'], true)); ! exit; ! } ! else ! { ! header($header_location . append_sid("index.$phpEx", true)); ! exit; ! } } } else --- 127,146 ---- session_end($userdata['session_id'], $userdata['user_id']); } ! if (!empty($HTTP_POST_VARS['redirect']) || !empty($HTTP_GET_VARS['redirect'])) { ! $url = (!empty($HTTP_POST_VARS['redirect'])) ? $HTTP_POST_VARS['redirect'] : $HTTP_GET_VARS['redirect']; ! redirect(append_sid($url, true)); } else { ! redirect(append_sid("index.$phpEx", true)); } } else { ! $url = ( !empty($HTTP_POST_VARS['redirect']) ) ? $HTTP_POST_VARS['redirect'] : "index.$phpEx"; ! redirect(append_sid($url, true)); } } else *************** *** 230,237 **** } else { ! header($header_location . append_sid("index.$phpEx", true)); ! exit; } } --- 217,223 ---- } else { ! redirect(append_sid("index.$phpEx", true)); } } diff -crbB phpbb203/memberlist.php phpbb206/memberlist.php *** phpbb203/memberlist.php Sun Jun 15 14:32:15 2003 --- phpbb206/memberlist.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: memberlist.php,v 1.36.2.2 2002/07/29 05:04:03 dougk_ff7 Exp $ * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: memberlist.php,v 1.36.2.8 2003/06/09 13:06:19 psotfx Exp $ * ***************************************************************************/ *************** *** 35,40 **** --- 35,49 ---- $start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0; + if ( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) + { + $mode = ( isset($HTTP_POST_VARS['mode']) ) ? htmlspecialchars($HTTP_POST_VARS['mode']) : htmlspecialchars($HTTP_GET_VARS['mode']); + } + else + { + $mode = 'joined'; + } + if(isset($HTTP_POST_VARS['order'])) { $sort_order = ($HTTP_POST_VARS['order'] == 'ASC') ? 'ASC' : 'DESC'; *************** *** 98,117 **** 'L_ICQ' => $lang['ICQ'], 'L_JOINED' => $lang['Joined'], 'L_POSTS' => $lang['Posts'], 'S_MODE_SELECT' => $select_sort_mode, 'S_ORDER_SELECT' => $select_sort_order, 'S_MODE_ACTION' => append_sid("memberlist.$phpEx")) ); ! if ( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) { ! $mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode']; ! ! switch( $mode ) ! { ! case 'joindate': ! $order_by = "user_regdate ASC LIMIT $start, " . $board_config['topics_per_page']; break; case 'username': $order_by = "username $sort_order LIMIT $start, " . $board_config['topics_per_page']; --- 107,123 ---- 'L_ICQ' => $lang['ICQ'], 'L_JOINED' => $lang['Joined'], 'L_POSTS' => $lang['Posts'], + 'L_PM' => $lang['Private_Message'], 'S_MODE_SELECT' => $select_sort_mode, 'S_ORDER_SELECT' => $select_sort_order, 'S_MODE_ACTION' => append_sid("memberlist.$phpEx")) ); ! switch( $mode ) { ! case 'joined': ! $order_by = "user_regdate $sort_order LIMIT $start, " . $board_config['topics_per_page']; break; case 'username': $order_by = "username $sort_order LIMIT $start, " . $board_config['topics_per_page']; *************** *** 129,144 **** $order_by = "user_website $sort_order LIMIT $start, " . $board_config['topics_per_page']; break; case 'topten': ! $order_by = "user_posts DESC LIMIT 10"; break; default: $order_by = "user_regdate $sort_order LIMIT $start, " . $board_config['topics_per_page']; break; - } - } - else - { - $order_by = "user_regdate $sort_order LIMIT $start, " . $board_config['topics_per_page']; } $sql = "SELECT username, user_id, user_viewemail, user_posts, user_regdate, user_from, user_website, user_email, user_icq, user_aim, user_yim, user_msnm, user_avatar, user_avatar_type, user_allowavatar --- 135,145 ---- $order_by = "user_website $sort_order LIMIT $start, " . $board_config['topics_per_page']; break; case 'topten': ! $order_by = "user_posts $sort_order LIMIT 10"; break; default: $order_by = "user_regdate $sort_order LIMIT $start, " . $board_config['topics_per_page']; break; } $sql = "SELECT username, user_id, user_viewemail, user_posts, user_regdate, user_from, user_website, user_email, user_icq, user_aim, user_yim, user_msnm, user_avatar, user_avatar_type, user_allowavatar diff -crbB phpbb203/modcp.php phpbb206/modcp.php *** phpbb203/modcp.php Sun Jun 15 14:32:15 2003 --- phpbb206/modcp.php Sat Jul 26 14:04:09 2003 *************** *** 6,13 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: modcp.php,v 1.71.2.7 2002/07/19 22:19:34 psotfx Exp $ ! * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: modcp.php,v 1.71.2.21 2003/07/26 11:41:35 acydburn Exp $ * ***************************************************************************/ *************** *** 106,111 **** --- 105,120 ---- } } + // session id check + if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid'])) + { + $sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid']; + } + else + { + $sid = ''; + } + // // Obtain relevant data // *************** *** 153,158 **** --- 162,173 ---- // End session management // + // session id check + if ($sid == '' || $sid != $userdata['session_id']) + { + message_die(GENERAL_ERROR, 'Invalid_session'); + } + // // Check if user did or did not confirm // If they did not, forward them to the last page they were on *************** *** 172,180 **** $redirect = "index.$phpEx"; } ! $header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: '; ! header($header_location . append_sid($redirect, true)); ! exit; } // --- 187,193 ---- $redirect = "index.$phpEx"; } ! redirect(append_sid($redirect, true)); } // *************** *** 196,201 **** --- 209,219 ---- switch( $mode ) { case 'delete': + if (!$is_auth['auth_delete']) + { + message_die(MESSAGE, sprintf($lang['Sorry_auth_delete'], $is_auth['auth_delete_type'])); + } + $page_title = $lang['Mod_CP']; include($phpbb_root_path . 'includes/page_header.'.$phpEx); *************** *** 208,216 **** $topic_id_sql = ''; for($i = 0; $i < count($topics); $i++) { ! $topic_id_sql .= ( ( $topic_id_sql != '' ) ? ', ' : '' ) . $topics[$i]; } $sql = "SELECT poster_id, COUNT(post_id) AS posts FROM " . POSTS_TABLE . " WHERE topic_id IN ($topic_id_sql) --- 226,250 ---- $topic_id_sql = ''; for($i = 0; $i < count($topics); $i++) { ! $topic_id_sql .= ( ( $topic_id_sql != '' ) ? ', ' : '' ) . intval($topics[$i]); } + $sql = "SELECT topic_id + FROM " . TOPICS_TABLE . " + WHERE topic_id IN ($topic_id_sql) + AND forum_id = $forum_id"; + if ( !($result = $db->sql_query($sql)) ) + { + message_die(GENERAL_ERROR, 'Could not get topic id information', '', __LINE__, __FILE__, $sql); + } + + $topic_id_sql = ''; + while ($row = $db->sql_fetchrow($result)) + { + $topic_id_sql .= (($topic_id_sql != '') ? ', ' : '') . intval($row['topic_id']); + } + $db->sql_freeresult($result); + $sql = "SELECT poster_id, COUNT(post_id) AS posts FROM " . POSTS_TABLE . " WHERE topic_id IN ($topic_id_sql) *************** *** 251,257 **** $post_id_sql = ''; while ( $row = $db->sql_fetchrow($result) ) { ! $post_id_sql .= ( ( $post_id_sql != '' ) ? ', ' : '' ) . $row['post_id']; } $db->sql_freeresult($result); --- 285,291 ---- $post_id_sql = ''; while ( $row = $db->sql_fetchrow($result) ) { ! $post_id_sql .= ( ( $post_id_sql != '' ) ? ', ' : '' ) . intval($row['post_id']); } $db->sql_freeresult($result); *************** *** 342,353 **** if ( !empty($topic_id) ) { ! $redirect_page = append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"); $l_redirect = sprintf($lang['Click_return_forum'], '', ''); } else { ! $redirect_page = append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id"); $l_redirect = sprintf($lang['Click_return_modcp'], '', ''); } --- 376,387 ---- if ( !empty($topic_id) ) { ! $redirect_page = "viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id']; $l_redirect = sprintf($lang['Click_return_forum'], '', ''); } else { ! $redirect_page = "modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id']; $l_redirect = sprintf($lang['Click_return_modcp'], '', ''); } *************** *** 365,371 **** message_die(GENERAL_MESSAGE, $lang['None_selected']); } ! $hidden_fields = ''; if ( isset($HTTP_POST_VARS['topic_id_list']) ) { --- 399,405 ---- message_die(GENERAL_MESSAGE, $lang['None_selected']); } ! $hidden_fields = ''; if ( isset($HTTP_POST_VARS['topic_id_list']) ) { *************** *** 415,421 **** message_die(GENERAL_MESSAGE, $lang['None_selected']); } ! $new_forum_id = $HTTP_POST_VARS['new_forum']; $old_forum_id = $forum_id; if ( $new_forum_id != $old_forum_id ) --- 449,455 ---- message_die(GENERAL_MESSAGE, $lang['None_selected']); } ! $new_forum_id = intval($HTTP_POST_VARS['new_forum']); $old_forum_id = $forum_id; if ( $new_forum_id != $old_forum_id ) *************** *** 431,436 **** --- 465,471 ---- $sql = "SELECT * FROM " . TOPICS_TABLE . " WHERE topic_id IN ($topic_list) + AND forum_id = $old_forum_id AND topic_status <> " . TOPIC_MOVED; if ( !($result = $db->sql_query($sql, BEGIN_TRANSACTION)) ) { *************** *** 486,501 **** if ( !empty($topic_id) ) { ! $redirect_page = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id"); $message .= sprintf($lang['Click_return_topic'], '', ''); } else { ! $redirect_page = append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id"); $message .= sprintf($lang['Click_return_modcp'], '', ''); } ! $message = $message . '

' . sprintf($lang['Click_return_forum'], '', ''); $template->assign_vars(array( 'META' => '') --- 521,536 ---- if ( !empty($topic_id) ) { ! $redirect_page = "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&sid=" . $userdata['session_id']; $message .= sprintf($lang['Click_return_topic'], '', ''); } else { ! $redirect_page = "modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id']; $message .= sprintf($lang['Click_return_modcp'], '', ''); } ! $message = $message . '

' . sprintf($lang['Click_return_forum'], '', ''); $template->assign_vars(array( 'META' => '') *************** *** 510,516 **** message_die(GENERAL_MESSAGE, $lang['None_selected']); } ! $hidden_fields = ''; if ( isset($HTTP_POST_VARS['topic_id_list']) ) { --- 545,551 ---- message_die(GENERAL_MESSAGE, $lang['None_selected']); } ! $hidden_fields = ''; if ( isset($HTTP_POST_VARS['topic_id_list']) ) { *************** *** 564,575 **** $topic_id_sql = ''; for($i = 0; $i < count($topics); $i++) { ! $topic_id_sql .= ( ( $topic_id_sql != '' ) ? ', ' : '' ) . $topics[$i]; } $sql = "UPDATE " . TOPICS_TABLE . " SET topic_status = " . TOPIC_LOCKED . " WHERE topic_id IN ($topic_id_sql) AND topic_moved_id = 0"; if ( !($result = $db->sql_query($sql)) ) { --- 599,611 ---- $topic_id_sql = ''; for($i = 0; $i < count($topics); $i++) { ! $topic_id_sql .= ( ( $topic_id_sql != '' ) ? ', ' : '' ) . intval($topics[$i]); } $sql = "UPDATE " . TOPICS_TABLE . " SET topic_status = " . TOPIC_LOCKED . " WHERE topic_id IN ($topic_id_sql) + AND forum_id = $forum_id AND topic_moved_id = 0"; if ( !($result = $db->sql_query($sql)) ) { *************** *** 578,593 **** if ( !empty($topic_id) ) { ! $redirect_page = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id"); $message = sprintf($lang['Click_return_topic'], '', ''); } else { ! $redirect_page = append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id"); $message = sprintf($lang['Click_return_modcp'], '', ''); } ! $message = $message . '

' . sprintf($lang['Click_return_forum'], '', ''); $template->assign_vars(array( 'META' => '') --- 614,629 ---- if ( !empty($topic_id) ) { ! $redirect_page = "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&sid=" . $userdata['session_id']; $message = sprintf($lang['Click_return_topic'], '', ''); } else { ! $redirect_page = "modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id']; $message = sprintf($lang['Click_return_modcp'], '', ''); } ! $message = $message . '

' . sprintf($lang['Click_return_forum'], '', ''); $template->assign_vars(array( 'META' => '') *************** *** 608,619 **** $topic_id_sql = ''; for($i = 0; $i < count($topics); $i++) { ! $topic_id_sql .= ( ( $topic_id_sql != "") ? ', ' : '' ) . $topics[$i]; } $sql = "UPDATE " . TOPICS_TABLE . " SET topic_status = " . TOPIC_UNLOCKED . " WHERE topic_id IN ($topic_id_sql) AND topic_moved_id = 0"; if ( !($result = $db->sql_query($sql)) ) { --- 644,656 ---- $topic_id_sql = ''; for($i = 0; $i < count($topics); $i++) { ! $topic_id_sql .= ( ( $topic_id_sql != "") ? ', ' : '' ) . intval($topics[$i]); } $sql = "UPDATE " . TOPICS_TABLE . " SET topic_status = " . TOPIC_UNLOCKED . " WHERE topic_id IN ($topic_id_sql) + AND forum_id = $forum_id AND topic_moved_id = 0"; if ( !($result = $db->sql_query($sql)) ) { *************** *** 622,637 **** if ( !empty($topic_id) ) { ! $redirect_page = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id"); $message = sprintf($lang['Click_return_topic'], '', ''); } else { ! $redirect_page = append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id"); $message = sprintf($lang['Click_return_modcp'], '', ''); } ! $message = $message . '

' . sprintf($lang['Click_return_forum'], '', ''); $template->assign_vars(array( 'META' => '') --- 659,674 ---- if ( !empty($topic_id) ) { ! $redirect_page = "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&sid=" . $userdata['session_id']; $message = sprintf($lang['Click_return_topic'], '', ''); } else { ! $redirect_page = "modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id']; $message = sprintf($lang['Click_return_modcp'], '', ''); } ! $message = $message . '

' . sprintf($lang['Click_return_forum'], '', ''); $template->assign_vars(array( 'META' => '') *************** *** 645,669 **** $page_title = $lang['Mod_CP']; include($phpbb_root_path . 'includes/page_header.'.$phpEx); ! if ( isset($HTTP_POST_VARS['split_type_all']) || isset($HTTP_POST_VARS['split_type_beyond']) ) { $posts = $HTTP_POST_VARS['post_id_list']; ! $sql = "SELECT poster_id, topic_id, post_time FROM " . POSTS_TABLE . " ! WHERE post_id = " . $posts[0]; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not get post information', '', __LINE__, __FILE__, $sql); } ! $post_rowset = $db->sql_fetchrow($result); ! $first_poster = str_replace("\'", "''", $post_rowset['poster_id']); ! $topic_id = $post_rowset['topic_id']; ! $post_time = $post_rowset['post_time']; $post_subject = trim(htmlspecialchars($HTTP_POST_VARS['subject'])); ! if ( empty($post_subject) ) { message_die(GENERAL_MESSAGE, $lang['Empty_subject']); } --- 682,743 ---- $page_title = $lang['Mod_CP']; include($phpbb_root_path . 'includes/page_header.'.$phpEx); ! $post_id_sql = ''; ! ! if (isset($HTTP_POST_VARS['split_type_all']) || isset($HTTP_POST_VARS['split_type_beyond'])) { $posts = $HTTP_POST_VARS['post_id_list']; ! for ($i = 0; $i < count($posts); $i++) ! { ! $post_id_sql .= (($post_id_sql != '') ? ', ' : '') . intval($posts[$i]); ! } ! } ! ! if ($post_id_sql != '') ! { ! $sql = "SELECT post_id FROM " . POSTS_TABLE . " ! WHERE post_id IN ($post_id_sql) ! AND forum_id = $forum_id"; if ( !($result = $db->sql_query($sql)) ) { + message_die(GENERAL_ERROR, 'Could not get post id information', '', __LINE__, __FILE__, $sql); + } + + $post_id_sql = ''; + while ($row = $db->sql_fetchrow($result)) + { + $post_id_sql .= (($post_id_sql != '') ? ', ' : '') . intval($row['post_id']); + } + $db->sql_freeresult($result); + + $sql = "SELECT post_id, poster_id, topic_id, post_time + FROM " . POSTS_TABLE . " + WHERE post_id IN ($post_id_sql) + ORDER BY post_time ASC"; + if (!($result = $db->sql_query($sql))) + { message_die(GENERAL_ERROR, 'Could not get post information', '', __LINE__, __FILE__, $sql); } ! if ($row = $db->sql_fetchrow($result)) ! { ! $first_poster = $row['poster_id']; ! $topic_id = $row['topic_id']; ! $post_time = $row['post_time']; ! ! $user_id_sql = ''; ! $post_id_sql = ''; ! do ! { ! $user_id_sql .= (($user_id_sql != '') ? ', ' : '') . intval($row['poster_id']); ! $post_id_sql .= (($post_id_sql != '') ? ', ' : '') . intval($row['post_id']);; ! } ! while ($row = $db->sql_fetchrow($result)); $post_subject = trim(htmlspecialchars($HTTP_POST_VARS['subject'])); ! if (empty($post_subject)) { message_die(GENERAL_MESSAGE, $lang['Empty_subject']); } *************** *** 673,706 **** $sql = "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type) VALUES ('" . str_replace("\'", "''", $post_subject) . "', $first_poster, " . $topic_time . ", $new_forum_id, " . TOPIC_UNLOCKED . ", " . POST_NORMAL . ")"; ! if ( !($result = $db->sql_query($sql, BEGIN_TRANSACTION)) ) { message_die(GENERAL_ERROR, 'Could not insert new topic', '', __LINE__, __FILE__, $sql); } $new_topic_id = $db->sql_nextid(); ! if( !empty($HTTP_POST_VARS['split_type_all']) ) { ! $post_id_sql = ''; ! for($i = 0; $i < count($posts); $i++) ! { ! $post_id_sql .= ( ( $post_id_sql != '' ) ? ', ' : '' ) . $posts[$i]; } $sql = "UPDATE " . POSTS_TABLE . " SET topic_id = $new_topic_id, forum_id = $new_forum_id ! WHERE post_id IN ($post_id_sql)"; ! } ! else if( !empty($HTTP_POST_VARS['split_type_beyond']) ) ! { ! $sql = "UPDATE " . POSTS_TABLE . " ! SET topic_id = $new_topic_id, forum_id = $new_forum_id ! WHERE post_time >= $post_time ! AND topic_id = $topic_id"; ! } ! ! if( !$db->sql_query($sql, END_TRANSACTION) ) { message_die(GENERAL_ERROR, 'Could not update posts table', '', __LINE__, __FILE__, $sql); } --- 747,776 ---- $sql = "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type) VALUES ('" . str_replace("\'", "''", $post_subject) . "', $first_poster, " . $topic_time . ", $new_forum_id, " . TOPIC_UNLOCKED . ", " . POST_NORMAL . ")"; ! if (!($db->sql_query($sql, BEGIN_TRANSACTION))) { message_die(GENERAL_ERROR, 'Could not insert new topic', '', __LINE__, __FILE__, $sql); } $new_topic_id = $db->sql_nextid(); ! // Update topic watch table, switch users whose posts ! // have moved, over to watching the new topic ! $sql = "UPDATE " . TOPICS_WATCH_TABLE . " ! SET topic_id = $new_topic_id ! WHERE topic_id = $topic_id ! AND user_id IN ($user_id_sql)"; ! if (!$db->sql_query($sql)) { ! message_die(GENERAL_ERROR, 'Could not update topics watch table', '', __LINE__, __FILE__, $sql); } + $sql_where = (!empty($HTTP_POST_VARS['split_type_beyond'])) ? " post_time >= $post_time AND topic_id = $topic_id" : "post_id IN ($post_id_sql)"; + $sql = "UPDATE " . POSTS_TABLE . " SET topic_id = $new_topic_id, forum_id = $new_forum_id ! WHERE $sql_where"; ! if (!$db->sql_query($sql, END_TRANSACTION)) { message_die(GENERAL_ERROR, 'Could not update posts table', '', __LINE__, __FILE__, $sql); } *************** *** 711,722 **** sync('forum', $forum_id); $template->assign_vars(array( ! 'META' => '') ); ! $message = $lang['Topic_split'] . '

' . sprintf($lang['Click_return_topic'], '', ''); message_die(GENERAL_MESSAGE, $message); } else { // --- 781,793 ---- sync('forum', $forum_id); $template->assign_vars(array( ! 'META' => '') ); ! $message = $lang['Topic_split'] . '

' . sprintf($lang['Click_return_topic'], '', ''); message_die(GENERAL_MESSAGE, $message); } + } else { // *************** *** 737,743 **** message_die(GENERAL_ERROR, 'Could not get topic/post information', '', __LINE__, __FILE__, $sql); } ! $s_hidden_fields = ''; if( ( $total_posts = $db->sql_numrows($result) ) > 0 ) { --- 808,814 ---- message_die(GENERAL_ERROR, 'Could not get topic/post information', '', __LINE__, __FILE__, $sql); } ! $s_hidden_fields = ''; if( ( $total_posts = $db->sql_numrows($result) ) > 0 ) { *************** *** 864,870 **** // Look up relevent data for this post $sql = "SELECT poster_ip, poster_id FROM " . POSTS_TABLE . " ! WHERE post_id = $post_id"; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not get poster IP information', '', __LINE__, __FILE__, $sql); --- 935,942 ---- // Look up relevent data for this post $sql = "SELECT poster_ip, poster_id FROM " . POSTS_TABLE . " ! WHERE post_id = $post_id ! AND forum_id = $forum_id"; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not get poster IP information', '', __LINE__, __FILE__, $sql); *************** *** 892,898 **** 'IP' => $ip_this_post, ! 'U_LOOKUP_IP' => append_sid("modcp.$phpEx?mode=ip&" . POST_POST_URL . "=$post_id&" . POST_TOPIC_URL . "=$topic_id&rdns=" . $ip_this_post)) ); // --- 964,970 ---- 'IP' => $ip_this_post, ! 'U_LOOKUP_IP' => "modcp.$phpEx?mode=ip&" . POST_POST_URL . "=$post_id&" . POST_TOPIC_URL . "=$topic_id&rdns=$ip_this_post&sid=" . $userdata['session_id']) ); // *************** *** 933,939 **** 'IP' => $ip, 'POSTS' => $row['postings'] . ' ' . ( ( $row['postings'] == 1 ) ? $lang['Post'] : $lang['Posts'] ), ! 'U_LOOKUP_IP' => append_sid("modcp.$phpEx?mode=ip&" . POST_POST_URL . "=$post_id&" . POST_TOPIC_URL . "=$topic_id&rdns=" . $row['poster_ip'])) ); $i++; --- 1005,1011 ---- 'IP' => $ip, 'POSTS' => $row['postings'] . ' ' . ( ( $row['postings'] == 1 ) ? $lang['Post'] : $lang['Posts'] ), ! 'U_LOOKUP_IP' => "modcp.$phpEx?mode=ip&" . POST_POST_URL . "=$post_id&" . POST_TOPIC_URL . "=$topic_id&rdns=" . $row['poster_ip'] . "&sid=" . $userdata['session_id']) ); $i++; *************** *** 973,979 **** 'POSTS' => $row['postings'] . ' ' . ( ( $row['postings'] == 1 ) ? $lang['Post'] : $lang['Posts'] ), 'L_SEARCH_POSTS' => sprintf($lang['Search_user_posts'], $username), ! 'U_PROFILE' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$id"), 'U_SEARCHPOSTS' => append_sid("search.$phpEx?search_author=" . urlencode($username) . "&showresults=topics")) ); --- 1045,1051 ---- 'POSTS' => $row['postings'] . ' ' . ( ( $row['postings'] == 1 ) ? $lang['Post'] : $lang['Posts'] ), 'L_SEARCH_POSTS' => sprintf($lang['Search_user_posts'], $username), ! 'U_PROFILE' => ($id == ANONYMOUS) ? "modcp.$phpEx?mode=ip&" . POST_POST_URL . "=" . $post_id . "&" . POST_TOPIC_URL . "=" . $topic_id . "&sid=" . $userdata['session_id'] : append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$id"), 'U_SEARCHPOSTS' => append_sid("search.$phpEx?search_author=" . urlencode($username) . "&showresults=topics")) ); *************** *** 1006,1018 **** 'L_SELECT' => $lang['Select'], 'U_VIEW_FORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"), ! 'S_HIDDEN_FIELDS' => '', 'S_MODCP_ACTION' => append_sid("modcp.$phpEx")) ); $template->set_filenames(array( 'body' => 'modcp_body.tpl') ); // // Define censored word matches --- 1078,1091 ---- 'L_SELECT' => $lang['Select'], 'U_VIEW_FORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"), ! 'S_HIDDEN_FIELDS' => '', 'S_MODCP_ACTION' => append_sid("modcp.$phpEx")) ); $template->set_filenames(array( 'body' => 'modcp_body.tpl') ); + make_jumpbox('modcp.'.$phpEx); // // Define censored word matches *************** *** 1093,1099 **** $topic_title = preg_replace($orig_word, $replacement_word, $topic_title); } ! $u_view_topic = append_sid("modcp.$phpEx?mode=split&" . POST_TOPIC_URL . "=$topic_id"); $topic_replies = $row['topic_replies']; $last_post_time = create_date($board_config['default_dateformat'], $row['post_time'], $board_config['board_timezone']); --- 1166,1172 ---- $topic_title = preg_replace($orig_word, $replacement_word, $topic_title); } ! $u_view_topic = "modcp.$phpEx?mode=split&" . POST_TOPIC_URL . "=$topic_id&sid=" . $userdata['session_id']; $topic_replies = $row['topic_replies']; $last_post_time = create_date($board_config['default_dateformat'], $row['post_time'], $board_config['board_timezone']); *************** *** 1113,1119 **** } $template->assign_vars(array( ! 'PAGINATION' => generate_pagination("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id", $forum_topics, $board_config['topics_per_page'], $start), 'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $forum_topics / $board_config['topics_per_page'] )), 'L_GOTO_PAGE' => $lang['Goto_page']) ); --- 1186,1192 ---- } $template->assign_vars(array( ! 'PAGINATION' => generate_pagination("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id'], $forum_topics, $board_config['topics_per_page'], $start), 'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $forum_topics / $board_config['topics_per_page'] )), 'L_GOTO_PAGE' => $lang['Goto_page']) ); diff -crbB phpbb203/posting.php phpbb206/posting.php *** phpbb203/posting.php Sun Jun 15 14:32:15 2003 --- phpbb206/posting.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: posting.php,v 1.159.2.6 2002/05/19 15:11:17 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: posting.php,v 1.159.2.18 2003/06/07 17:52:31 acydburn Exp $ * * ***************************************************************************/ *************** *** 116,124 **** $post_append = ''; } ! $header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: '; ! header($header_location . append_sid($redirect, true) . $post_append); ! exit; } // --- 116,122 ---- $post_append = ''; } ! redirect(append_sid($redirect, true) . $post_append); } // *************** *** 189,195 **** message_die(GENERAL_MESSAGE, $lang['No_topic_id']); } ! $sql = "SELECT f.*, t.topic_status FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t WHERE t.topic_id = $topic_id AND f.forum_id = t.forum_id"; --- 187,193 ---- message_die(GENERAL_MESSAGE, $lang['No_topic_id']); } ! $sql = "SELECT f.*, t.topic_status, t.topic_title FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t WHERE t.topic_id = $topic_id AND f.forum_id = t.forum_id"; *************** *** 282,288 **** } else { ! $post_data['edit_poll'] = false; } // --- 280,286 ---- } else { ! $post_data['edit_poll'] = ($post_data['first_post'] && $is_auth['auth_pollcreate']) ? true : false; } // *************** *** 348,356 **** break; } ! $header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: '; ! header($header_location . append_sid("login.$phpEx?redirect=posting.$phpEx&" . $redirect, true)); ! exit; } // --- 346,352 ---- break; } ! redirect(append_sid("login.$phpEx?redirect=posting.$phpEx&" . $redirect, true)); } // *************** *** 383,395 **** $smilies_on = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['disable_smilies']) ) ? 0 : TRUE ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? $board_config['allow_smilies'] : $userdata['user_allowsmile'] ); } ! if ( $submit || $refresh ) { $notify_user = ( !empty($HTTP_POST_VARS['notify']) ) ? TRUE : 0; } else { ! if ( $mode != 'newtopic' && $userdata['session_logged_in'] ) { $sql = "SELECT topic_id FROM " . TOPICS_WATCH_TABLE . " --- 379,391 ---- $smilies_on = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['disable_smilies']) ) ? 0 : TRUE ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? $board_config['allow_smilies'] : $userdata['user_allowsmile'] ); } ! if ( ($submit || $refresh) && $is_auth['auth_read']) { $notify_user = ( !empty($HTTP_POST_VARS['notify']) ) ? TRUE : 0; } else { ! if ( $mode != 'newtopic' && $userdata['session_logged_in'] && $is_auth['auth_read'] ) { $sql = "SELECT topic_id FROM " . TOPICS_WATCH_TABLE . " *************** *** 404,410 **** } else { ! $notify_user = ( $userdata['session_logged_in'] ) ? $userdata['user_notify'] : 0; } } --- 400,406 ---- } else { ! $notify_user = ( $userdata['session_logged_in'] && $is_auth['auth_read'] ) ? $userdata['user_notify'] : 0; } } *************** *** 516,521 **** --- 512,521 ---- $message .= '

' . sprintf($lang['Click_view_message'], '', ''); message_die(GENERAL_MESSAGE, $message); } + else + { + redirect(append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id", true)); + } } else if ( $submit || $confirm ) { *************** *** 545,554 **** $topic_type = ( $topic_type != $post_data['topic_type'] && !$is_auth['auth_sticky'] && !$is_auth['auth_announce'] ) ? $post_data['topic_type'] : $topic_type; submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace("\'", "''", $username), str_replace("\'", "''", $subject), str_replace("\'", "''", $message), str_replace("\'", "''", $poll_title), $poll_options, $poll_length); - if ( $error_msg == '' ) - { - user_notification($mode, $post_data, $forum_id, $topic_id, $post_id, $notify_user); - } } break; --- 545,550 ---- *************** *** 566,571 **** --- 562,572 ---- update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $user_id); } + if ($error_msg == '' && $mode != 'poll_delete') + { + user_notification($mode, $post_data, $post_info['topic_title'], $forum_id, $topic_id, $post_id, $notify_user); + } + if ( $mode == 'newtopic' || $mode == 'reply' ) { $tracking_topics = ( !empty($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) : array(); *************** *** 780,786 **** $msg_date = create_date($board_config['default_dateformat'], $postrow['post_time'], $board_config['board_timezone']); ! $quote_username = ( !empty($post_info['post_username']) ) ? $post_info['post_username'] : $post_info['username']; $message = '[quote="' . $quote_username . '"]' . $message . '[/quote]'; if ( !empty($orig_word) ) --- 781,788 ---- $msg_date = create_date($board_config['default_dateformat'], $postrow['post_time'], $board_config['board_timezone']); ! // Use trim to get rid of spaces placed there by MS-SQL 2000 ! $quote_username = ( trim($post_info['post_username']) != '' ) ? $post_info['post_username'] : $post_info['username']; $message = '[quote="' . $quote_username . '"]' . $message . '[/quote]'; if ( !empty($orig_word) ) *************** *** 858,864 **** // // Notify checkbox - only show if user is logged in // ! if ( $userdata['session_logged_in'] ) { if ( $mode != 'editpost' || ( $mode == 'editpost' && $post_info['poster_id'] != ANONYMOUS ) ) { --- 860,866 ---- // // Notify checkbox - only show if user is logged in // ! if ( $userdata['session_logged_in'] && $is_auth['auth_read'] ) { if ( $mode != 'editpost' || ( $mode == 'editpost' && $post_info['poster_id'] != ANONYMOUS ) ) { *************** *** 1041,1047 **** // // Poll entry switch/output // ! if( ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['first_post'] ) ) && $is_auth['auth_pollcreate'] ) { $template->assign_vars(array( 'L_ADD_A_POLL' => $lang['Add_poll'], --- 1043,1049 ---- // // Poll entry switch/output // ! if( ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['edit_poll']) ) && $is_auth['auth_pollcreate'] ) { $template->assign_vars(array( 'L_ADD_A_POLL' => $lang['Add_poll'], *************** *** 1060,1066 **** 'POLL_LENGTH' => $poll_length) ); ! if( $mode == 'editpost' && $post_data['edit_poll'] ) { $template->assign_block_vars('switch_poll_delete_toggle', array()); } --- 1062,1068 ---- 'POLL_LENGTH' => $poll_length) ); ! if( $mode == 'editpost' && $post_data['edit_poll'] && $post_data['has_poll']) { $template->assign_block_vars('switch_poll_delete_toggle', array()); } *************** *** 1083,1089 **** // // Topic review // ! if( $mode == 'reply' ) { require($phpbb_root_path . 'includes/topic_review.'.$phpEx); topic_review($topic_id, true); --- 1085,1091 ---- // // Topic review // ! if( $mode == 'reply' && $is_auth['auth_read'] ) { require($phpbb_root_path . 'includes/topic_review.'.$phpEx); topic_review($topic_id, true); diff -crbB phpbb203/privmsg.php phpbb206/privmsg.php *** phpbb203/privmsg.php Sun Jun 15 14:32:15 2003 --- phpbb206/privmsg.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: privmsg.php,v 1.96.2.9 2002/07/19 15:19:31 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: privmsg.php,v 1.96.2.32 2003/06/12 12:49:01 psotfx Exp $ * * ***************************************************************************/ *************** *** 35,41 **** message_die(GENERAL_MESSAGE, 'PM_disabled'); } ! $html_entities_match = array('#&#', '#<#', '#>#'); $html_entities_replace = array('&', '<', '>'); // --- 35,41 ---- message_die(GENERAL_MESSAGE, 'PM_disabled'); } ! $html_entities_match = array('#&(?!(\#[0-9]+;))#', '#<#', '#>#'); $html_entities_replace = array('&', '<', '>'); // *************** *** 69,74 **** --- 69,84 ---- $folder = 'inbox'; } + // session id check + if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid'])) + { + $sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid']; + } + else + { + $sid = ''; + } + // // Start session management // *************** *** 83,91 **** // if ( $cancel ) { ! $header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: '; ! header($header_location . append_sid("privmsg.$phpEx?folder=$folder", true)); ! exit; } // --- 93,99 ---- // if ( $cancel ) { ! redirect(append_sid("privmsg.$phpEx?folder=$folder", true)); } // *************** *** 153,159 **** $l_new_message = $lang['You_no_new_pm']; } ! $l_new_message .= '

' . sprintf($lang['Click_view_privmsg'], '', ''); } else { --- 161,167 ---- $l_new_message = $lang['You_no_new_pm']; } ! $l_new_message .= '

' . sprintf($lang['Click_view_privmsg'], '', ''); } else { *************** *** 183,191 **** if ( !$userdata['session_logged_in'] ) { ! $header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: '; ! header($header_location . append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=$folder&mode=$mode&" . POST_POST_URL . "=$privmsgs_id", true)); ! exit; } // --- 191,197 ---- if ( !$userdata['session_logged_in'] ) { ! redirect(append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=$folder&mode=$mode&" . POST_POST_URL . "=$privmsgs_id", true)); } // *************** *** 245,253 **** // if ( !($privmsg = $db->sql_fetchrow($result)) ) { ! $header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: '; ! header($header_location . append_sid("privmsg.$phpEx?folder=$folder", true)); ! exit; } $privmsg_id = $privmsg['privmsgs_id']; --- 251,257 ---- // if ( !($privmsg = $db->sql_fetchrow($result)) ) { ! redirect(append_sid("privmsg.$phpEx?folder=$folder", true)); } $privmsg_id = $privmsg['privmsgs_id']; *************** *** 256,282 **** // Is this a new message in the inbox? If it is then save // a copy in the posters sent box // ! if ( ( $privmsg['privmsgs_type'] == PRIVMSGS_NEW_MAIL || $privmsg['privmsgs_type'] == PRIVMSGS_UNREAD_MAIL ) && $folder == 'inbox' ) { ! $sql = "UPDATE " . PRIVMSGS_TABLE . " ! SET privmsgs_type = " . PRIVMSGS_READ_MAIL . " ! WHERE privmsgs_id = " . $privmsg['privmsgs_id']; ! if ( !$db->sql_query($sql) ) { ! message_die(GENERAL_ERROR, 'Could not update private message read status', '', __LINE__, __FILE__, $sql); } $sql = "UPDATE " . USERS_TABLE . " ! SET user_unread_privmsg = user_unread_privmsg - 1 WHERE user_id = " . $userdata['user_id']; if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not update private message read status for user', '', __LINE__, __FILE__, $sql); } ! // // Check to see if the poster has a 'full' sent box - // $sql = "SELECT COUNT(privmsgs_id) AS sent_items, MIN(privmsgs_date) AS oldest_post_time FROM " . PRIVMSGS_TABLE . " WHERE privmsgs_type = " . PRIVMSGS_SENT_MAIL . " --- 260,295 ---- // Is this a new message in the inbox? If it is then save // a copy in the posters sent box // ! if (($privmsg['privmsgs_type'] == PRIVMSGS_NEW_MAIL || $privmsg['privmsgs_type'] == PRIVMSGS_UNREAD_MAIL) && $folder == 'inbox') { ! // Update appropriate counter ! switch ($privmsg['privmsgs_type']) { ! case PRIVMSGS_NEW_MAIL: ! $sql = "user_new_privmsg = user_new_privmsg - 1"; ! break; ! case PRIVMSGS_UNREAD_MAIL: ! $sql = "user_unread_privmsg = user_unread_privmsg - 1"; ! break; } $sql = "UPDATE " . USERS_TABLE . " ! SET $sql WHERE user_id = " . $userdata['user_id']; if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not update private message read status for user', '', __LINE__, __FILE__, $sql); } ! $sql = "UPDATE " . PRIVMSGS_TABLE . " ! SET privmsgs_type = " . PRIVMSGS_READ_MAIL . " ! WHERE privmsgs_id = " . $privmsg['privmsgs_id']; ! if ( !$db->sql_query($sql) ) ! { ! message_die(GENERAL_ERROR, 'Could not update private message read status', '', __LINE__, __FILE__, $sql); ! } ! // Check to see if the poster has a 'full' sent box $sql = "SELECT COUNT(privmsgs_id) AS sent_items, MIN(privmsgs_date) AS oldest_post_time FROM " . PRIVMSGS_TABLE . " WHERE privmsgs_type = " . PRIVMSGS_SENT_MAIL . " *************** *** 292,304 **** { if ( $sent_info['sent_items'] >= $board_config['max_sentbox_privmsgs'] ) { ! $sql = "DELETE $sql_priority FROM " . PRIVMSGS_TABLE . " WHERE privmsgs_type = " . PRIVMSGS_SENT_MAIL . " AND privmsgs_date = " . $sent_info['oldest_post_time'] . " AND privmsgs_from_userid = " . $privmsg['privmsgs_from_userid']; if ( !$db->sql_query($sql) ) { ! message_die(GENERAL_ERROR, 'Could not delete oldest privmsgs', '', __LINE__, __FILE__, $sql); } } } --- 305,333 ---- { if ( $sent_info['sent_items'] >= $board_config['max_sentbox_privmsgs'] ) { ! $sql = "SELECT privmsgs_id FROM " . PRIVMSGS_TABLE . " WHERE privmsgs_type = " . PRIVMSGS_SENT_MAIL . " AND privmsgs_date = " . $sent_info['oldest_post_time'] . " AND privmsgs_from_userid = " . $privmsg['privmsgs_from_userid']; + if ( !$result = $db->sql_query($sql) ) + { + message_die(GENERAL_ERROR, 'Could not find oldest privmsgs', '', __LINE__, __FILE__, $sql); + } + $old_privmsgs_id = $db->sql_fetchrow($result); + $old_privmsgs_id = $old_privmsgs_id['privmsgs_id']; + + $sql = "DELETE $sql_priority FROM " . PRIVMSGS_TABLE . " + WHERE privmsgs_id = $old_privmsgs_id"; + if ( !$db->sql_query($sql) ) + { + message_die(GENERAL_ERROR, 'Could not delete oldest privmsgs (sent)', '', __LINE__, __FILE__, $sql); + } + + $sql = "DELETE $sql_priority FROM " . PRIVMSGS_TEXT_TABLE . " + WHERE privmsgs_text_id = $old_privmsgs_id"; if ( !$db->sql_query($sql) ) { ! message_die(GENERAL_ERROR, 'Could not delete oldest privmsgs text (sent)', '', __LINE__, __FILE__, $sql); } } } *************** *** 335,347 **** 'edit' => append_sid("privmsg.$phpEx?mode=edit&" . POST_POST_URL . "=$privmsg_id") ); $post_icons = array( ! 'post_img' => '' . $lang['Post_new_pm'] . '', 'post' => '' . $lang['Post_new_pm'] . '', ! 'reply_img' => '' . $lang['Post_reply_pm'] . '', 'reply' => '' . $lang['Post_reply_pm'] . '', ! 'quote_img' => '' . $lang['Post_quote_pm'] . '', 'quote' => '' . $lang['Post_quote_pm'] . '', ! 'edit_img' => '' . $lang['Edit_pm'] . '', 'edit' => '' . $lang['Edit_pm'] . '' ); --- 364,376 ---- 'edit' => append_sid("privmsg.$phpEx?mode=edit&" . POST_POST_URL . "=$privmsg_id") ); $post_icons = array( ! 'post_img' => '' . $lang['Post_new_pm'] . '', 'post' => '' . $lang['Post_new_pm'] . '', ! 'reply_img' => '' . $lang['Post_reply_pm'] . '', 'reply' => '' . $lang['Post_reply_pm'] . '', ! 'quote_img' => '' . $lang['Post_quote_pm'] . '', 'quote' => '' . $lang['Post_quote_pm'] . '', ! 'edit_img' => '' . $lang['Edit_pm'] . '', 'edit' => '' . $lang['Edit_pm'] . '' ); *************** *** 508,514 **** $aim_img = ( $privmsg['user_aim'] ) ? '' . $lang['AIM'] . '' : ''; $aim = ( $privmsg['user_aim'] ) ? '' . $lang['AIM'] . '' : ''; ! $temp_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$poster_id"); $msn_img = ( $privmsg['user_msnm'] ) ? '' . $lang['MSNM'] . '' : ''; $msn = ( $privmsg['user_msnm'] ) ? '' . $lang['MSNM'] . '' : ''; --- 537,543 ---- $aim_img = ( $privmsg['user_aim'] ) ? '' . $lang['AIM'] . '' : ''; $aim = ( $privmsg['user_aim'] ) ? '' . $lang['AIM'] . '' : ''; ! $temp_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id_from"); $msn_img = ( $privmsg['user_msnm'] ) ? '' . $lang['MSNM'] . '' : ''; $msn = ( $privmsg['user_msnm'] ) ? '' . $lang['MSNM'] . '' : ''; *************** *** 632,641 **** { if ( !$userdata['session_logged_in'] ) { ! $header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: '; ! header($header_location . append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=inbox", true)); ! exit; } if ( isset($mark_list) && !is_array($mark_list) ) { // Set to empty array instead of '0' if nothing is selected. --- 661,669 ---- { if ( !$userdata['session_logged_in'] ) { ! redirect(append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=inbox", true)); } + if ( isset($mark_list) && !is_array($mark_list) ) { // Set to empty array instead of '0' if nothing is selected. *************** *** 649,655 **** for($i = 0; $i < count($mark_list); $i++) { ! $s_hidden_fields .= ''; } // --- 677,683 ---- for($i = 0; $i < count($mark_list); $i++) { ! $s_hidden_fields .= ''; } // *************** *** 721,790 **** if ( count($mark_list) ) { ! $delete_sql_id = implode(', ', $mark_list); ! // ! // Need to decrement the new message counter of recipient ! // problem is this doesn't affect the unread counter even ! // though it may be the one that needs changing ... hhmmm ! // ! if ( $folder == 'outbox' ) { ! $sql = "SELECT privmsgs_to_userid FROM " . PRIVMSGS_TABLE . " WHERE privmsgs_id IN ($delete_sql_id) ! AND privmsgs_from_userid = " . $userdata['user_id'] . " ! AND privmsgs_type = " . PRIVMSGS_NEW_MAIL; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not obtain user id list for outbox messages', '', __LINE__, __FILE__, $sql); } ! $update_pm_sql = ''; ! while( $row = $db->sql_fetchrow($result) ) { ! $update_pm_sql .= ( ( $update_pm_sql != '' ) ? ', ' : '' ) . $row['privmsgs_to_userid']; ! } ! if ( $update_pm_sql != '' ) { ! $sql = "UPDATE " . USERS_TABLE . " ! SET user_new_privmsg = user_new_privmsg - 1 ! WHERE user_id IN ($update_pm_sql)"; ! if ( !$db->sql_query($sql) ) { ! message_die(GENERAL_ERROR, 'Could not update users new msg counters', '', __LINE__, __FILE__, $sql); } } ! $sql = "SELECT privmsgs_to_userid ! FROM " . PRIVMSGS_TABLE . " ! WHERE privmsgs_id IN ($delete_sql_id) ! AND privmsgs_from_userid = " . $userdata['user_id'] . " ! AND privmsgs_type = " . PRIVMSGS_UNREAD_MAIL; ! if ( !($result = $db->sql_query($sql)) ) { ! message_die(GENERAL_ERROR, 'Could not obtain user id list for outbox messages', '', __LINE__, __FILE__, $sql); } ! $update_pm_sql = ''; ! while( $row = $db->sql_fetchrow($result) ) { ! $update_pm_sql .= ( ( $update_pm_sql != '' ) ? ', ' : '' ) . $row['privmsgs_to_userid']; } ! if ( $update_pm_sql != '' ) { $sql = "UPDATE " . USERS_TABLE . " ! SET user_unread_privmsg = user_unread_privmsg - 1 ! WHERE user_id IN ($update_pm_sql)"; if ( !$db->sql_query($sql) ) { ! message_die(GENERAL_ERROR, 'Could not update users new msg counters', '', __LINE__, __FILE__, $sql); } } } $delete_text_sql = "DELETE FROM " . PRIVMSGS_TEXT_TABLE . " WHERE privmsgs_text_id IN ($delete_sql_id)"; $delete_sql = "DELETE FROM " . PRIVMSGS_TABLE . " --- 749,847 ---- if ( count($mark_list) ) { ! $delete_sql_id = ''; ! for ($i = 0; $i < sizeof($mark_list); $i++) ! { ! $delete_sql_id .= (($delete_sql_id != '') ? ', ' : '') . intval($mark_list[$i]); ! } ! if ($folder == 'inbox' || $folder == 'outbox') ! { ! switch ($folder) { ! case 'inbox': ! $sql = "privmsgs_to_userid = " . $userdata['user_id']; ! break; ! case 'outbox': ! $sql = "privmsgs_from_userid = " . $userdata['user_id']; ! break; ! } ! ! // Get information relevant to new or unread mail ! // so we can adjust users counters appropriately ! $sql = "SELECT privmsgs_to_userid, privmsgs_type FROM " . PRIVMSGS_TABLE . " WHERE privmsgs_id IN ($delete_sql_id) ! AND $sql ! AND privmsgs_type IN (" . PRIVMSGS_NEW_MAIL . ", " . PRIVMSGS_UNREAD_MAIL . ")"; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not obtain user id list for outbox messages', '', __LINE__, __FILE__, $sql); } ! if ( $row = $db->sql_fetchrow($result)) { ! $update_users = $update_list = array(); ! do { ! switch ($row['privmsgs_type']) { ! case PRIVMSGS_NEW_MAIL: ! $update_users['new'][$row['privmsgs_to_userid']]++; ! break; ! ! case PRIVMSGS_UNREAD_MAIL: ! $update_users['unread'][$row['privmsgs_to_userid']]++; ! break; } } + while ($row = $db->sql_fetchrow($result)); ! if (sizeof($update_users)) { ! while (list($type, $users) = each($update_users)) ! { ! while (list($user_id, $dec) = each($users)) ! { ! $update_list[$type][$dec][] = $user_id; ! } } + unset($update_users); ! while (list($type, $dec_ary) = each($update_list)) { ! switch ($type) ! { ! case 'new': ! $type = "user_new_privmsg"; ! break; ! ! case 'unread': ! $type = "user_unread_privmsg"; ! break; } ! while (list($dec, $user_ary) = each($dec_ary)) { + $user_ids = implode(', ', $user_ary); + $sql = "UPDATE " . USERS_TABLE . " ! SET $type = $type - $dec ! WHERE user_id IN ($user_ids)"; if ( !$db->sql_query($sql) ) { ! message_die(GENERAL_ERROR, 'Could not update user pm counters', '', __LINE__, __FILE__, $sql); ! } ! } } + unset($update_list); } } + $db->sql_freeresult($result); + } + // Delete the messages $delete_text_sql = "DELETE FROM " . PRIVMSGS_TEXT_TABLE . " WHERE privmsgs_text_id IN ($delete_sql_id)"; $delete_sql = "DELETE FROM " . PRIVMSGS_TABLE . " *************** *** 831,844 **** { if ( !$userdata['session_logged_in'] ) { ! $header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: '; ! header($header_location . append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=inbox", true)); ! exit; } ! // // See if recipient is at their savebox limit - // $sql = "SELECT COUNT(privmsgs_id) AS savebox_items, MIN(privmsgs_date) AS oldest_post_time FROM " . PRIVMSGS_TABLE . " WHERE ( ( privmsgs_to_userid = " . $userdata['user_id'] . " --- 888,899 ---- { if ( !$userdata['session_logged_in'] ) { ! redirect(append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=inbox", true)); } ! if (sizeof($mark_list)) ! { // See if recipient is at their savebox limit $sql = "SELECT COUNT(privmsgs_id) AS savebox_items, MIN(privmsgs_date) AS oldest_post_time FROM " . PRIVMSGS_TABLE . " WHERE ( ( privmsgs_to_userid = " . $userdata['user_id'] . " *************** *** 856,880 **** { if ( $saved_info['savebox_items'] >= $board_config['max_savebox_privmsgs'] ) { ! $sql = "DELETE $sql_priority FROM " . PRIVMSGS_TABLE . " WHERE ( ( privmsgs_to_userid = " . $userdata['user_id'] . " AND privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " ) OR ( privmsgs_from_userid = " . $userdata['user_id'] . " AND privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . ") ) AND privmsgs_date = " . $saved_info['oldest_post_time']; if ( !$db->sql_query($sql) ) { ! message_die(GENERAL_ERROR, 'Could not delete oldest privmsgs', '', __LINE__, __FILE__, $sql); } } } ! // // Process request - // $saved_sql = "UPDATE " . PRIVMSGS_TABLE; ! switch( $folder ) { case 'inbox': $saved_sql .= " SET privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " --- 911,1042 ---- { if ( $saved_info['savebox_items'] >= $board_config['max_savebox_privmsgs'] ) { ! $sql = "SELECT privmsgs_id FROM " . PRIVMSGS_TABLE . " WHERE ( ( privmsgs_to_userid = " . $userdata['user_id'] . " AND privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " ) OR ( privmsgs_from_userid = " . $userdata['user_id'] . " AND privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . ") ) AND privmsgs_date = " . $saved_info['oldest_post_time']; + if ( !$result = $db->sql_query($sql) ) + { + message_die(GENERAL_ERROR, 'Could not find oldest privmsgs (save)', '', __LINE__, __FILE__, $sql); + } + $old_privmsgs_id = $db->sql_fetchrow($result); + $old_privmsgs_id = $old_privmsgs_id['privmsgs_id']; + + $sql = "DELETE $sql_priority FROM " . PRIVMSGS_TABLE . " + WHERE privmsgs_id = $old_privmsgs_id"; if ( !$db->sql_query($sql) ) { ! message_die(GENERAL_ERROR, 'Could not delete oldest privmsgs (save)', '', __LINE__, __FILE__, $sql); ! } ! ! $sql = "DELETE $sql_priority FROM " . PRIVMSGS_TEXT_TABLE . " ! WHERE privmsgs_text_id = $old_privmsgs_id"; ! if ( !$db->sql_query($sql) ) ! { ! message_die(GENERAL_ERROR, 'Could not delete oldest privmsgs text (save)', '', __LINE__, __FILE__, $sql); } } } ! $saved_sql_id = ''; ! for ($i = 0; $i < sizeof($mark_list); $i++) ! { ! $saved_sql_id .= (($saved_sql_id != '') ? ', ' : '') . intval($mark_list[$i]); ! } ! // Process request $saved_sql = "UPDATE " . PRIVMSGS_TABLE; ! // Decrement read/new counters if appropriate ! if ($folder == 'inbox' || $folder == 'outbox') ! { ! switch ($folder) ! { ! case 'inbox': ! $sql = "privmsgs_to_userid = " . $userdata['user_id']; ! break; ! case 'outbox': ! $sql = "privmsgs_from_userid = " . $userdata['user_id']; ! break; ! } ! ! // Get information relevant to new or unread mail ! // so we can adjust users counters appropriately ! $sql = "SELECT privmsgs_to_userid, privmsgs_type ! FROM " . PRIVMSGS_TABLE . " ! WHERE privmsgs_id IN ($saved_sql_id) ! AND $sql ! AND privmsgs_type IN (" . PRIVMSGS_NEW_MAIL . ", " . PRIVMSGS_UNREAD_MAIL . ")"; ! if ( !($result = $db->sql_query($sql)) ) ! { ! message_die(GENERAL_ERROR, 'Could not obtain user id list for outbox messages', '', __LINE__, __FILE__, $sql); ! } ! ! if ( $row = $db->sql_fetchrow($result)) ! { ! $update_users = $update_list = array(); ! ! do ! { ! switch ($row['privmsgs_type']) ! { ! case PRIVMSGS_NEW_MAIL: ! $update_users['new'][$row['privmsgs_to_userid']]++; ! break; ! ! case PRIVMSGS_UNREAD_MAIL: ! $update_users['unread'][$row['privmsgs_to_userid']]++; ! break; ! } ! } ! while ($row = $db->sql_fetchrow($result)); ! ! if (sizeof($update_users)) ! { ! while (list($type, $users) = each($update_users)) ! { ! while (list($user_id, $dec) = each($users)) ! { ! $update_list[$type][$dec][] = $user_id; ! } ! } ! unset($update_users); ! ! while (list($type, $dec_ary) = each($update_list)) ! { ! switch ($type) ! { ! case 'new': ! $type = "user_new_privmsg"; ! break; ! ! case 'unread': ! $type = "user_unread_privmsg"; ! break; ! } ! ! while (list($dec, $user_ary) = each($dec_ary)) ! { ! $user_ids = implode(', ', $user_ary); ! ! $sql = "UPDATE " . USERS_TABLE . " ! SET $type = $type - $dec ! WHERE user_id IN ($user_ids)"; ! if ( !$db->sql_query($sql) ) ! { ! message_die(GENERAL_ERROR, 'Could not update user pm counters', '', __LINE__, __FILE__, $sql); ! } ! } ! } ! unset($update_list); ! } ! } ! $db->sql_freeresult($result); ! } ! ! switch ($folder) { case 'inbox': $saved_sql .= " SET privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " *************** *** 898,919 **** break; } - if ( count($mark_list) ) - { - $saved_sql_id = ''; - for($i = 0; $i < count($mark_list); $i++) - { - $saved_sql_id .= ( ( $saved_sql_id != '' ) ? ', ' : '' ) . $mark_list[$i]; - } - $saved_sql .= " AND privmsgs_id IN ($saved_sql_id)"; if ( !$db->sql_query($saved_sql) ) { message_die(GENERAL_ERROR, 'Could not save private messages', '', __LINE__, __FILE__, $saved_sql); } - } } else if ( $submit || $refresh || $mode != '' ) { --- 1060,1074 ---- break; } $saved_sql .= " AND privmsgs_id IN ($saved_sql_id)"; if ( !$db->sql_query($saved_sql) ) { message_die(GENERAL_ERROR, 'Could not save private messages', '', __LINE__, __FILE__, $saved_sql); } + redirect(append_sid("privmsg.$phpEx?folder=savebox", true)); + } } else if ( $submit || $refresh || $mode != '' ) { *************** *** 921,929 **** if ( !$userdata['session_logged_in'] ) { $user_id = ( isset($HTTP_GET_VARS[POST_USERS_URL]) ) ? '&' . POST_USERS_URL . '=' . intval($HTTP_GET_VARS[POST_USERS_URL]) : ''; ! $header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: '; ! header($header_location . append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=$folder&mode=$mode" . $user_id, true)); ! exit; } // --- 1075,1081 ---- if ( !$userdata['session_logged_in'] ) { $user_id = ( isset($HTTP_GET_VARS[POST_USERS_URL]) ) ? '&' . POST_USERS_URL . '=' . intval($HTTP_GET_VARS[POST_USERS_URL]) : ''; ! redirect(append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=$folder&mode=$mode" . $user_id, true)); } // *************** *** 1070,1084 **** { if ( $inbox_info['inbox_items'] >= $board_config['max_inbox_privmsgs'] ) { ! $sql = "DELETE $sql_priority FROM " . PRIVMSGS_TABLE . " WHERE ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_READ_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " ) AND privmsgs_date = " . $inbox_info['oldest_post_time'] . " AND privmsgs_to_userid = " . $to_userdata['user_id']; if ( !$db->sql_query($sql) ) { ! message_die(GENERAL_ERROR, 'Could not delete oldest privmsgs', '', __LINE__, __FILE__, $sql); } } } --- 1222,1252 ---- { if ( $inbox_info['inbox_items'] >= $board_config['max_inbox_privmsgs'] ) { ! $sql = "SELECT privmsgs_id FROM " . PRIVMSGS_TABLE . " WHERE ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_READ_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " ) AND privmsgs_date = " . $inbox_info['oldest_post_time'] . " AND privmsgs_to_userid = " . $to_userdata['user_id']; + if ( !$result = $db->sql_query($sql) ) + { + message_die(GENERAL_ERROR, 'Could not find oldest privmsgs (inbox)', '', __LINE__, __FILE__, $sql); + } + $old_privmsgs_id = $db->sql_fetchrow($result); + $old_privmsgs_id = $old_privmsgs_id['privmsgs_id']; + + $sql = "DELETE $sql_priority FROM " . PRIVMSGS_TABLE . " + WHERE privmsgs_id = $old_privmsgs_id"; + if ( !$db->sql_query($sql) ) + { + message_die(GENERAL_ERROR, 'Could not delete oldest privmsgs (inbox)'.$sql, '', __LINE__, __FILE__, $sql); + } + + $sql = "DELETE $sql_priority FROM " . PRIVMSGS_TEXT_TABLE . " + WHERE privmsgs_text_id = $old_privmsgs_id"; if ( !$db->sql_query($sql) ) { ! message_die(GENERAL_ERROR, 'Could not delete oldest privmsgs text (inbox)', '', __LINE__, __FILE__, $sql); } } } *************** *** 1132,1139 **** if ( $to_userdata['user_notify_pm'] && !empty($to_userdata['user_email']) && $to_userdata['user_active'] ) { - $email_headers = 'From: ' . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\n"; - $script_name = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($board_config['script_path'])); $script_name = ( $script_name != '' ) ? $script_name . '/privmsg.'.$phpEx : 'privmsg.'.$phpEx; $server_name = trim($board_config['server_name']); --- 1300,1305 ---- *************** *** 1143,1157 **** include($phpbb_root_path . 'includes/emailer.'.$phpEx); $emailer = new emailer($board_config['smtp_delivery']); $emailer->use_template('privmsg_notify', $to_userdata['user_lang']); - $emailer->extra_headers($email_headers); $emailer->email_address($to_userdata['user_email']); ! $emailer->set_subject(); //$lang['Notification_subject'] $emailer->assign_vars(array( 'USERNAME' => $to_username, 'SITENAME' => $board_config['sitename'], ! 'EMAIL_SIG' => str_replace('
', "\n", "-- \n" . $board_config['board_email_sig']), 'U_INBOX' => $server_protocol . $server_name . $server_port . $script_name . '?folder=inbox') ); --- 1309,1325 ---- include($phpbb_root_path . 'includes/emailer.'.$phpEx); $emailer = new emailer($board_config['smtp_delivery']); + $emailer->from($board_config['board_email']); + $emailer->replyto($board_config['board_email']); + $emailer->use_template('privmsg_notify', $to_userdata['user_lang']); $emailer->email_address($to_userdata['user_email']); ! $emailer->set_subject($lang['Notification_subject']); $emailer->assign_vars(array( 'USERNAME' => $to_username, 'SITENAME' => $board_config['sitename'], ! 'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('
', "\n", "-- \n" . $board_config['board_email_sig']) : '', 'U_INBOX' => $server_protocol . $server_name . $server_port . $script_name . '?folder=inbox') ); *************** *** 1271,1279 **** if ( !($privmsg = $db->sql_fetchrow($result)) ) { ! $header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: '; ! header($header_location . append_sid("privmsg.$phpEx?folder=$folder", true)); ! exit; } $privmsg_subject = $privmsg['privmsgs_subject']; --- 1439,1445 ---- if ( !($privmsg = $db->sql_fetchrow($result)) ) { ! redirect(append_sid("privmsg.$phpEx?folder=$folder", true)); } $privmsg_subject = $privmsg['privmsgs_subject']; *************** *** 1289,1295 **** $privmsg_message = str_replace('
', "\n", $privmsg_message); $privmsg_message = preg_replace('##si', '</textarea>', $privmsg_message); ! $user_sig = ( $board_config['allow_sig'] ) ? $privmsg['user_sig'] : ''; $to_username = $privmsg['username']; $to_userid = $privmsg['user_id']; --- 1455,1461 ---- $privmsg_message = str_replace('
', "\n", $privmsg_message); $privmsg_message = preg_replace('##si', '</textarea>', $privmsg_message); ! $user_sig = ( $board_config['allow_sig'] ) ? (($privmsg['privmsgs_type'] == PRIVMSGS_NEW_MAIL) ? $user_sig : $privmsg['user_sig']) : ''; $to_username = $privmsg['username']; $to_userid = $privmsg['user_id']; *************** *** 1311,1319 **** if ( !($privmsg = $db->sql_fetchrow($result)) ) { ! $header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: '; ! header($header_location . append_sid("privmsg.$phpEx?folder=$folder", true)); ! exit; } $privmsg_subject = ( ( !preg_match('/^Re:/', $privmsg['privmsgs_subject']) ) ? 'Re: ' : '' ) . $privmsg['privmsgs_subject']; --- 1477,1483 ---- if ( !($privmsg = $db->sql_fetchrow($result)) ) { ! redirect(append_sid("privmsg.$phpEx?folder=$folder", true)); } $privmsg_subject = ( ( !preg_match('/^Re:/', $privmsg['privmsgs_subject']) ) ? 'Re: ' : '' ) . $privmsg['privmsgs_subject']; *************** *** 1546,1559 **** // generate_smilies('inline', PAGE_PRIVMSGS); $template->assign_vars(array( ! 'SUBJECT' => preg_replace($html_entities_match, $html_entities_replace, $privmsg_subject), 'USERNAME' => preg_replace($html_entities_match, $html_entities_replace, $to_username), 'MESSAGE' => $privmsg_message, 'HTML_STATUS' => $html_status, 'SMILIES_STATUS' => $smilies_status, 'BBCODE_STATUS' => sprintf($bbcode_status, '', ''), ! 'FORUM_NAME' => $lang['Private_message'], 'BOX_NAME' => $l_box_name, 'INBOX_IMG' => $inbox_img, --- 1710,1726 ---- // generate_smilies('inline', PAGE_PRIVMSGS); + $privmsg_subject = preg_replace($html_entities_match, $html_entities_replace, $privmsg_subject); + $privmsg_subject = str_replace('"', '"', $privmsg_subject); + $template->assign_vars(array( ! 'SUBJECT' => $privmsg_subject, 'USERNAME' => preg_replace($html_entities_match, $html_entities_replace, $to_username), 'MESSAGE' => $privmsg_message, 'HTML_STATUS' => $html_status, 'SMILIES_STATUS' => $smilies_status, 'BBCODE_STATUS' => sprintf($bbcode_status, '', ''), ! 'FORUM_NAME' => $lang['Private_Message'], 'BOX_NAME' => $l_box_name, 'INBOX_IMG' => $inbox_img, *************** *** 1643,1651 **** // if ( !$userdata['session_logged_in'] ) { ! $header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: '; ! header($header_location . append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=inbox", true)); ! exit; } // --- 1810,1816 ---- // if ( !$userdata['session_logged_in'] ) { ! redirect(append_sid("login.$phpEx?redirect=privmsg.$phpEx&folder=inbox", true)); } // *************** *** 1745,1756 **** OR ( privmsgs_from_userid = " . $userdata['user_id'] . " AND privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . ") )"; ! $sql .= "WHERE ( ( pm.privmsgs_to_userid = " . $userdata['user_id'] . " ! AND pm.privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " ! AND u.user_id = pm.privmsgs_from_userid ) OR ( pm.privmsgs_from_userid = " . $userdata['user_id'] . " ! AND pm.privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . " ! AND u.user_id = pm.privmsgs_from_userid ) )"; break; default: --- 1910,1920 ---- OR ( privmsgs_from_userid = " . $userdata['user_id'] . " AND privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . ") )"; ! $sql .= "WHERE u.user_id = pm.privmsgs_from_userid ! AND ( ( pm.privmsgs_to_userid = " . $userdata['user_id'] . " ! AND pm.privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " ) OR ( pm.privmsgs_from_userid = " . $userdata['user_id'] . " ! AND pm.privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . " ) )"; break; default: *************** *** 1833,1839 **** break; } $post_pm = append_sid("privmsg.$phpEx?mode=post"); ! $post_pm_img = '' . $lang['Post_new_pm'] . ''; $post_pm = '' . $lang['Post_new_pm'] . ''; // --- 1997,2003 ---- break; } $post_pm = append_sid("privmsg.$phpEx?mode=post"); ! $post_pm_img = '' . $lang['Post_new_pm'] . ''; $post_pm = '' . $lang['Post_new_pm'] . ''; // diff -crbB phpbb203/profile.php phpbb206/profile.php *** phpbb203/profile.php Sun Jun 15 14:32:15 2003 --- phpbb206/profile.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: profile.php,v 1.193 2002/03/28 19:52:21 the_systech Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: profile.php,v 1.193.2.3 2003/03/02 23:16:17 acydburn Exp $ * * ***************************************************************************/ *************** *** 34,39 **** --- 34,49 ---- // End session management // + // session id check + if (!empty($HTTP_POST_VARS['sid']) || !empty($HTTP_GET_VARS['sid'])) + { + $sid = (!empty($HTTP_POST_VARS['sid'])) ? $HTTP_POST_VARS['sid'] : $HTTP_GET_VARS['sid']; + } + else + { + $sid = ''; + } + // // Set default email variables // *************** *** 83,91 **** { if ( !$userdata['session_logged_in'] && $mode == 'editprofile' ) { ! $header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: "; ! header($header_location . append_sid("login.$phpEx?redirect=profile.$phpEx&mode=editprofile", true)); ! exit; } include($phpbb_root_path . 'includes/usercp_register.'.$phpEx); --- 93,99 ---- { if ( !$userdata['session_logged_in'] && $mode == 'editprofile' ) { ! redirect(append_sid("login.$phpEx?redirect=profile.$phpEx&mode=editprofile", true)); } include($phpbb_root_path . 'includes/usercp_register.'.$phpEx); *************** *** 107,117 **** exit; } } ! else ! { ! $header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: "; ! header($header_location . append_sid("index.$phpEx", true)); ! exit; ! } ?> --- 115,121 ---- exit; } } ! ! redirect(append_sid("index.$phpEx", true)); ?> \ No newline at end of file diff -crbB phpbb203/search.php phpbb206/search.php *** phpbb203/search.php Sun Jun 15 14:32:15 2003 --- phpbb206/search.php Sun Jul 20 16:37:22 2003 *************** *** 6,12 **** * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: search.php,v 1.72.2.4 2002/05/13 01:30:59 psotfx Exp $ * * ***************************************************************************/ --- 6,12 ---- * copyright : (C) 2001 The phpBB Group * email : support@phpbb.com * ! * $Id: search.php,v 1.72.2.10 2003/07/11 17:04:31 psotfx Exp $ * * ***************************************************************************/ *************** *** 146,151 **** --- 146,155 ---- $store_vars = array('search_results', 'total_match_count', 'split_search', 'sort_by', 'sort_dir', 'show_results', 'return_chars'); // + // Search ID Limiter, decrease this value if you experience further timeout problems with searching forums + $limiter = 5000; + + // // Cycle through options ... // if ( $search_id == 'newposts' || $search_id == 'egosearch' || $search_id == 'unanswered' || $search_keywords != '' || $search_author != '' ) *************** *** 162,169 **** } else { ! header("Location: login.$phpEx?redirect=search.$phpEx&search_id=newposts", true); ! exit; } $show_results = 'topics'; --- 166,172 ---- } else { ! redirect(append_sid("login.$phpEx?redirect=search.$phpEx&search_id=newposts", true)); } $show_results = 'topics'; *************** *** 176,187 **** { $sql = "SELECT post_id FROM " . POSTS_TABLE . " ! WHERE poster_id = " . $userdata['user_id'];; } else { ! header("Location: login.$phpEx?redirect=search.$phpEx&search_id=egosearch", true); ! exit; } $show_results = 'topics'; --- 179,189 ---- { $sql = "SELECT post_id FROM " . POSTS_TABLE . " ! WHERE poster_id = " . $userdata['user_id']; } else { ! redirect(append_sid("login.$phpEx?redirect=search.$phpEx&search_id=egosearch", true)); } $show_results = 'topics'; *************** *** 217,222 **** --- 219,229 ---- $sql = "SELECT post_id FROM " . POSTS_TABLE . " WHERE poster_id IN ($matching_userids)"; + + if ($search_time) + { + $sql .= " AND post_time >= " . $search_time; + } } if ( !($result = $db->sql_query($sql)) ) *************** *** 402,407 **** --- 409,444 ---- { if ( $show_results == 'topics' ) { + // + // This one is a beast, try to seperate it a bit (workaround for connection timeouts) + // + $search_id_chunks = array(); + $count = 0; + $chunk = 0; + + if (count($search_ids) > $limiter) + { + for ($i = 0; $i < count($search_ids); $i++) + { + if ($count == $limiter) + { + $chunk++; + $count = 0; + } + + $search_id_chunks[$chunk][$count] = $search_ids[$i]; + $count++; + } + } + else + { + $search_id_chunks[0] = $search_ids; + } + + $search_ids = array(); + + for ($i = 0; $i < count($search_id_chunks); $i++) + { $where_sql = ''; if ( $search_time ) *************** *** 413,419 **** { $sql = "SELECT topic_id FROM " . POSTS_TABLE . " ! WHERE post_id IN (" . implode(", ", $search_ids) . ") $where_sql GROUP BY topic_id"; } --- 450,456 ---- { $sql = "SELECT topic_id FROM " . POSTS_TABLE . " ! WHERE post_id IN (" . implode(", ", $search_id_chunks[$i]) . ") $where_sql GROUP BY topic_id"; } *************** *** 435,441 **** $sql = "SELECT p.topic_id FROM $from_sql ! WHERE p.post_id IN (" . implode(", ", $search_ids) . ") $where_sql GROUP BY p.topic_id"; } --- 472,478 ---- $sql = "SELECT p.topic_id FROM $from_sql ! WHERE p.post_id IN (" . implode(", ", $search_id_chunks[$i]) . ") $where_sql GROUP BY p.topic_id"; } *************** *** 445,463 **** message_die(GENERAL_ERROR, 'Could not obtain topic ids', '', __LINE__, __FILE__, $sql); } ! $search_ids = array(); ! while( $row = $db->sql_fetchrow($result) ) { $search_ids[] = $row['topic_id']; } $db->sql_freeresult($result); $total_match_count = sizeof($search_ids); } else if ( $search_author != '' || $search_time || $auth_sql != '' ) { ! $where_sql = ( $search_author == '' && $auth_sql == '' ) ? 'post_id IN (' . implode(', ', $search_ids) . ')' : 'p.post_id IN (' . implode(', ', $search_ids) . ')'; $from_sql = ( $search_author == '' && $auth_sql == '' ) ? POSTS_TABLE : POSTS_TABLE . ' p'; if ( $search_time ) --- 482,528 ---- message_die(GENERAL_ERROR, 'Could not obtain topic ids', '', __LINE__, __FILE__, $sql); } ! while ($row = $db->sql_fetchrow($result)) { $search_ids[] = $row['topic_id']; } $db->sql_freeresult($result); + } $total_match_count = sizeof($search_ids); } else if ( $search_author != '' || $search_time || $auth_sql != '' ) { ! $search_id_chunks = array(); ! $count = 0; ! $chunk = 0; ! ! if (count($search_ids) > $limiter) ! { ! for ($i = 0; $i < count($search_ids); $i++) ! { ! if ($count == $limiter) ! { ! $chunk++; ! $count = 0; ! } ! ! $search_id_chunks[$chunk][$count] = $search_ids[$i]; ! $count++; ! } ! } ! else ! { ! $search_id_chunks[0] = $search_ids; ! } ! ! $search_ids = array(); ! ! for ($i = 0; $i < count($search_id_chunks); $i++) ! { ! $where_sql = ( $search_author == '' && $auth_sql == '' ) ? 'post_id IN (' . implode(', ', $search_id_chunks[$i]) . ')' : 'p.post_id IN (' . implode(', ', $search_id_chunks[$i]) . ')'; ! $select_sql = ( $search_author == '' && $auth_sql == '' ) ? 'post_id' : 'p.post_id'; $from_sql = ( $search_author == '' && $auth_sql == '' ) ? POSTS_TABLE : POSTS_TABLE . ' p'; if ( $search_time ) *************** *** 477,483 **** $where_sql .= " AND u.user_id = p.poster_id AND u.username LIKE '$search_author'"; } ! $sql = "SELECT p.post_id FROM $from_sql WHERE $where_sql"; if ( !($result = $db->sql_query($sql)) ) --- 542,548 ---- $where_sql .= " AND u.user_id = p.poster_id AND u.username LIKE '$search_author'"; } ! $sql = "SELECT " . $select_sql . " FROM $from_sql WHERE $where_sql"; if ( !($result = $db->sql_query($sql)) ) *************** *** 485,491 **** message_die(GENERAL_ERROR, 'Could not obtain post ids', '', __LINE__, __FILE__, $sql); } - $search_ids = array(); while( $row = $db->sql_fetchrow($result) ) { $search_ids[] = $row['post_id']; --- 550,555 ---- *************** *** 490,497 **** { $search_ids[] = $row['post_id']; } - $db->sql_freeresult($result); $total_match_count = count($search_ids); } --- 554,561 ---- { $search_ids[] = $row['post_id']; } $db->sql_freeresult($result); + } $total_match_count = count($search_ids); } *************** *** 577,582 **** --- 641,661 ---- // so we can serialize it and place it in the DB // $store_search_data = array(); + + // + // Limit the character length (and with this the results displayed at all following pages) to prevent + // truncated result arrays. Normally, search results above 12000 are affected. + // - to include or not to include + /* + $max_result_length = 60000; + if (strlen($search_results) > $max_result_length) + { + $search_results = substr($search_results, 0, $max_result_length); + $search_results = substr($search_results, 0, strrpos($search_results, ',')); + $total_match_count = count(explode(', ', $search_results)); + } + */ + for($i = 0; $i < count($store_vars); $i++) { $store_search_data[$store_vars[$i]] = $$store_vars[$i]; *************** *** 589,595 **** $search_id = mt_rand(); $sql = "UPDATE " . SEARCH_TABLE . " ! SET search_id = $search_id, search_array = '$result_array' WHERE session_id = '" . $userdata['session_id'] . "'"; if ( !($result = $db->sql_query($sql)) || !$db->sql_affectedrows() ) { --- 668,674 ---- $search_id = mt_rand(); $sql = "UPDATE " . SEARCH_TABLE . " ! SET search_id = $search_id, search_array = '" . str_replace("\'", "''", $result_array) . "' WHERE session_id = '" . $userdata['session_id'] . "'"; if ( !($result = $db->sql_query($sql)) || !$db->sql_affectedrows() ) { *************** *** 781,791 **** $message = preg_replace("/\[.*?:$bbcode_uid:?.*?\]/si", '', $message); $message = preg_replace('/\[url\]|\[\/url\]/si', '', $message); $message = ( strlen($message) > $return_chars ) ? substr($message, 0, $return_chars) . ' ...' : $message; - - if ( count($search_string) ) - { - $message = preg_replace($search_string, $replace_string, $message); - } } else { --- 860,865 ---- *************** *** 1321,1327 **** 'S_CATEGORY_OPTIONS' => $s_categories, 'S_TIME_OPTIONS' => $s_time, 'S_SORT_OPTIONS' => $s_sort_by, ! 'S_HIDDEN_FIELDS' => $s_hidden_fields) ); $template->pparse('body'); --- 1395,1401 ---- 'S_CATEGORY_OPTIONS' => $s_categories, 'S_TIME_OPTIONS' => $s_time, 'S_SORT_OPTIONS' => $s_sort_by, ! 'S_HIDDEN_FIELDS' => '') ); $template->pparse('body'); diff -crbB phpbb203/templates/subSilver/admin/board_config_body.tpl phpbb206/templates/subSilver/admin/board_config_body.tpl *** phpbb203/templates/subSilver/admin/board_config_body.tpl Sun Jun 15 14:32:16 2003 --- phpbb206/templates/subSilver/admin/board_config_body.tpl Sun Jul 20 16:37:23 2003 *************** *** 9,31 **** {L_SERVER_NAME} ! {L_SERVER_PORT}
{L_SERVER_PORT_EXPLAIN} ! {L_SCRIPT_PATH}
{L_SCRIPT_PATH_EXPLAIN} ! {L_SITE_NAME}
{L_SITE_NAME_EXPLAIN} ! {L_SITE_DESCRIPTION} ! {L_DISABLE_BOARD}
{L_DISABLE_BOARD_EXPLAIN} --- 9,31 ---- {L_SERVER_NAME} ! {L_SERVER_PORT}
{L_SERVER_PORT_EXPLAIN} ! {L_SCRIPT_PATH}
{L_SCRIPT_PATH_EXPLAIN} ! {L_SITE_NAME}
{L_SITE_NAME_EXPLAIN} ! {L_SITE_DESCRIPTION} ! {L_DISABLE_BOARD}
{L_DISABLE_BOARD_EXPLAIN} *************** *** 41,59 **** {L_FLOOD_INTERVAL}
{L_FLOOD_INTERVAL_EXPLAIN} ! {L_TOPICS_PER_PAGE} ! {L_POSTS_PER_PAGE} ! {L_HOT_THRESHOLD} ! {L_DEFAULT_STYLE} --- 41,59 ---- {L_FLOOD_INTERVAL}
{L_FLOOD_INTERVAL_EXPLAIN} ! {L_TOPICS_PER_PAGE} ! {L_POSTS_PER_PAGE} ! {L_HOT_THRESHOLD} ! {L_DEFAULT_STYLE} *************** *** 69,75 **** {L_DATE_FORMAT}
{L_DATE_FORMAT_EXPLAIN} ! {L_SYSTEM_TIMEZONE} --- 69,75 ---- {L_DATE_FORMAT}
{L_DATE_FORMAT_EXPLAIN} ! {L_SYSTEM_TIMEZONE} *************** *** 91,105 **** {L_COOKIE_DOMAIN} ! {L_COOKIE_NAME} ! {L_COOKIE_PATH} ! {L_COOKIE_SECURE}
{L_COOKIE_SECURE_EXPLAIN} --- 91,105 ---- {L_COOKIE_DOMAIN} ! {L_COOKIE_NAME} ! {L_COOKIE_PATH} ! {L_COOKIE_SECURE}
{L_COOKIE_SECURE_EXPLAIN} *************** *** 107,113 **** {L_SESSION_LENGTH} ! {L_PRIVATE_MESSAGING} --- 107,113 ---- {L_SESSION_LENGTH} ! {L_PRIVATE_MESSAGING} *************** *** 118,139 **** {L_INBOX_LIMIT} ! {L_SENTBOX_LIMIT} ! {L_SAVEBOX_LIMIT} ! {L_ABILITIES_SETTINGS} {L_MAX_POLL_OPTIONS} ! {L_ALLOW_HTML} --- 118,139 ---- {L_INBOX_LIMIT} ! {L_SENTBOX_LIMIT} ! {L_SAVEBOX_LIMIT} ! {L_ABILITIES_SETTINGS} {L_MAX_POLL_OPTIONS} ! {L_ALLOW_HTML} *************** *** 141,147 **** {L_ALLOWED_TAGS}
{L_ALLOWED_TAGS_EXPLAIN} ! {L_ALLOW_BBCODE} --- 141,147 ---- {L_ALLOWED_TAGS}
{L_ALLOWED_TAGS_EXPLAIN} ! {L_ALLOW_BBCODE} *************** *** 153,159 **** {L_SMILIES_PATH}
{L_SMILIES_PATH_EXPLAIN} ! {L_ALLOW_SIG} --- 153,159 ---- {L_SMILIES_PATH}
{L_SMILIES_PATH_EXPLAIN} ! {L_ALLOW_SIG} *************** *** 161,167 **** {L_MAX_SIG_LENGTH}
{L_MAX_SIG_LENGTH_EXPLAIN} ! {L_ALLOW_NAME_CHANGE} --- 161,167 ---- {L_MAX_SIG_LENGTH}
{L_MAX_SIG_LENGTH_EXPLAIN} ! {L_ALLOW_NAME_CHANGE} *************** *** 184,211 **** {L_MAX_FILESIZE}
{L_MAX_FILESIZE_EXPLAIN} ! Bytes {L_MAX_AVATAR_SIZE}
{L_MAX_AVATAR_SIZE_EXPLAIN} ! x {L_AVATAR_STORAGE_PATH}
{L_AVATAR_STORAGE_PATH_EXPLAIN} ! {L_AVATAR_GALLERY_PATH}
{L_AVATAR_GALLERY_PATH_EXPLAIN} ! {L_COPPA_SETTINGS} {L_COPPA_FAX} ! {L_COPPA_MAIL}
{L_COPPA_MAIL_EXPLAIN} --- 184,211 ---- {L_MAX_FILESIZE}
{L_MAX_FILESIZE_EXPLAIN} ! Bytes {L_MAX_AVATAR_SIZE}
{L_MAX_AVATAR_SIZE_EXPLAIN} ! x {L_AVATAR_STORAGE_PATH}
{L_AVATAR_STORAGE_PATH_EXPLAIN} ! {L_AVATAR_GALLERY_PATH}
{L_AVATAR_GALLERY_PATH_EXPLAIN} ! {L_COPPA_SETTINGS} {L_COPPA_FAX} ! {L_COPPA_MAIL}
{L_COPPA_MAIL_EXPLAIN} *************** *** 217,223 **** {L_ADMIN_EMAIL} ! {L_EMAIL_SIG}
{L_EMAIL_SIG_EXPLAIN} --- 217,223 ---- {L_ADMIN_EMAIL} ! {L_EMAIL_SIG}
{L_EMAIL_SIG_EXPLAIN} *************** *** 229,243 **** {L_SMTP_SERVER} ! {L_SMTP_USERNAME}
{L_SMTP_USERNAME_EXPLAIN} ! {L_SMTP_PASSWORD}
{L_SMTP_PASSWORD_EXPLAIN} ! {S_HIDDEN_FIELDS}   --- 229,243 ---- {L_SMTP_SERVER} ! {L_SMTP_USERNAME}
{L_SMTP_USERNAME_EXPLAIN} ! {L_SMTP_PASSWORD}
{L_SMTP_PASSWORD_EXPLAIN} ! {S_HIDDEN_FIELDS}   diff -crbB phpbb203/templates/subSilver/admin/category_edit_body.tpl phpbb206/templates/subSilver/admin/category_edit_body.tpl *** phpbb203/templates/subSilver/admin/category_edit_body.tpl Sun Jun 15 14:32:16 2003 --- phpbb206/templates/subSilver/admin/category_edit_body.tpl Sun Jul 20 16:37:23 2003 *************** *** 10,16 **** {L_CATEGORY} ! {S_HIDDEN_FIELDS} --- 10,16 ---- {L_CATEGORY} ! {S_HIDDEN_FIELDS} diff -crbB phpbb203/templates/subSilver/admin/db_utils_backup_body.tpl phpbb206/templates/subSilver/admin/db_utils_backup_body.tpl *** phpbb203/templates/subSilver/admin/db_utils_backup_body.tpl Sun Jun 15 14:32:16 2003 --- phpbb206/templates/subSilver/admin/db_utils_backup_body.tpl Sun Jul 20 16:37:23 2003 *************** *** 21,27 **** {L_ADDITIONAL_TABLES} ! {L_GZIP_COMPRESS} --- 21,27 ---- {L_ADDITIONAL_TABLES} ! {L_GZIP_COMPRESS} diff -crbB phpbb203/templates/subSilver/admin/disallow_body.tpl phpbb206/templates/subSilver/admin/disallow_body.tpl *** phpbb203/templates/subSilver/admin/disallow_body.tpl Sun Jun 15 14:32:16 2003 --- phpbb206/templates/subSilver/admin/disallow_body.tpl Sun Jul 20 16:37:23 2003 *************** *** 9,15 **** {L_USERNAME}
{L_ADD_EXPLAIN} !   {L_DELETE_DISALLOW} --- 9,15 ---- {L_USERNAME}
{L_ADD_EXPLAIN} !   {L_DELETE_DISALLOW} diff -crbB phpbb203/templates/subSilver/admin/forum_admin_body.tpl phpbb206/templates/subSilver/admin/forum_admin_body.tpl *** phpbb203/templates/subSilver/admin/forum_admin_body.tpl Sun Jun 15 14:32:16 2003 --- phpbb206/templates/subSilver/admin/forum_admin_body.tpl Sun Jul 20 16:37:23 2003 *************** *** 27,39 **** ! ! --- 27,39 ---- ! ! diff -crbB phpbb203/templates/subSilver/admin/group_edit_body.tpl phpbb206/templates/subSilver/admin/group_edit_body.tpl *** phpbb203/templates/subSilver/admin/group_edit_body.tpl Sun Jun 15 14:32:16 2003 --- phpbb206/templates/subSilver/admin/group_edit_body.tpl Sun Jul 20 16:37:23 2003 *************** *** 11,28 **** {L_GROUP_NAME}: ! {L_GROUP_DESCRIPTION}: ! {L_GROUP_MODERATOR}: !   --- 11,28 ---- {L_GROUP_NAME}: ! {L_GROUP_DESCRIPTION}: ! {L_GROUP_MODERATOR}: !   diff -crbB phpbb203/templates/subSilver/admin/ranks_edit_body.tpl phpbb206/templates/subSilver/admin/ranks_edit_body.tpl *** phpbb203/templates/subSilver/admin/ranks_edit_body.tpl Sun Jun 15 14:32:16 2003 --- phpbb206/templates/subSilver/admin/ranks_edit_body.tpl Sun Jul 20 16:37:23 2003 *************** *** 9,15 **** {L_RANK_TITLE}: ! {L_RANK_SPECIAL} --- 9,15 ---- {L_RANK_TITLE}: ! {L_RANK_SPECIAL} *************** *** 17,28 **** {L_RANK_MINIMUM}: ! {L_RANK_IMAGE}:
{L_RANK_IMAGE_EXPLAIN} !
{IMAGE_DISPLAY}    --- 17,28 ---- {L_RANK_MINIMUM}: ! {L_RANK_IMAGE}:
{L_RANK_IMAGE_EXPLAIN} !
{IMAGE_DISPLAY}    diff -crbB phpbb203/templates/subSilver/admin/smile_edit_body.tpl phpbb206/templates/subSilver/admin/smile_edit_body.tpl *** phpbb203/templates/subSilver/admin/smile_edit_body.tpl Sun Jun 15 14:32:16 2003 --- phpbb206/templates/subSilver/admin/smile_edit_body.tpl Sun Jul 20 16:37:23 2003 *************** *** 18,24 **** {L_SMILEY_CODE} ! {L_SMILEY_URL} --- 18,24 ---- {L_SMILEY_CODE} ! {L_SMILEY_URL} *************** *** 26,32 **** {L_SMILEY_EMOTION} ! {S_HIDDEN_FIELDS} --- 26,32 ---- {L_SMILEY_EMOTION} ! {S_HIDDEN_FIELDS} diff -crbB phpbb203/templates/subSilver/admin/styles_edit_body.tpl phpbb206/templates/subSilver/admin/styles_edit_body.tpl *** phpbb203/templates/subSilver/admin/styles_edit_body.tpl Sun Jun 15 14:32:16 2003 --- phpbb206/templates/subSilver/admin/styles_edit_body.tpl Sun Jul 20 16:37:23 2003 *************** *** 9,15 **** {L_THEME_NAME}: ! {L_TEMPLATE}: --- 9,15 ---- {L_THEME_NAME}: ! {L_TEMPLATE}: *************** *** 22,239 **** {L_STYLESHEET}:
Filename for CSS stylesheet to use for this theme. !   {L_BACKGROUND_IMAGE}: !   {L_BACKGROUND_COLOR}: !   {L_BODY_TEXT_COLOR}: !   {L_BODY_LINK_COLOR}: !   {L_BODY_VLINK_COLOR}: !   {L_BODY_ALINK_COLOR}: !   {L_BODY_HLINK_COLOR}: !   {L_TR_COLOR1}: ! ! {L_TR_COLOR2}: ! ! {L_TR_COLOR3}: ! ! {L_TR_CLASS1}: ! ! {L_TR_CLASS2}: ! ! {L_TR_CLASS3}: ! ! {L_TH_COLOR1}: ! ! {L_TH_COLOR2}: ! ! {L_TH_COLOR3}: ! ! {L_TH_CLASS1}: ! ! {L_TH_CLASS2}: ! ! {L_TH_CLASS3}: ! ! {L_TD_COLOR1}: ! ! {L_TD_COLOR2}: ! ! {L_TD_COLOR3}: ! ! {L_TD_CLASS1}: ! ! {L_TD_CLASS2}: ! ! {L_TD_CLASS3}: ! ! {L_FONTFACE_1}: ! ! {L_FONTFACE_2}: ! ! {L_FONTFACE_3}: ! ! {L_FONTSIZE_1}: ! ! {L_FONTSIZE_2}: ! ! {L_FONTSIZE_3}: ! ! {L_FONTCOLOR_1}: ! ! {L_FONTCOLOR_2}: ! ! {L_FONTCOLOR_3}: ! ! {L_SPAN_CLASS_1}: ! ! {L_SPAN_CLASS_2}: ! ! {L_SPAN_CLASS_3}: ! ! --- 22,239 ---- {L_STYLESHEET}:
Filename for CSS stylesheet to use for this theme. !   {L_BACKGROUND_IMAGE}: !   {L_BACKGROUND_COLOR}: !   {L_BODY_TEXT_COLOR}: !   {L_BODY_LINK_COLOR}: !   {L_BODY_VLINK_COLOR}: !   {L_BODY_ALINK_COLOR}: !   {L_BODY_HLINK_COLOR}: !   {L_TR_COLOR1}: ! ! {L_TR_COLOR2}: ! ! {L_TR_COLOR3}: ! ! {L_TR_CLASS1}: ! ! {L_TR_CLASS2}: ! ! {L_TR_CLASS3}: ! ! {L_TH_COLOR1}: ! ! {L_TH_COLOR2}: ! ! {L_TH_COLOR3}: ! ! {L_TH_CLASS1}: ! ! {L_TH_CLASS2}: ! ! {L_TH_CLASS3}: ! ! {L_TD_COLOR1}: ! ! {L_TD_COLOR2}: ! ! {L_TD_COLOR3}: ! ! {L_TD_CLASS1}: ! ! {L_TD_CLASS2}: ! ! {L_TD_CLASS3}: ! ! {L_FONTFACE_1}: ! ! {L_FONTFACE_2}: ! ! {L_FONTFACE_3}: ! ! {L_FONTSIZE_1}: ! ! {L_FONTSIZE_2}: ! ! {L_FONTSIZE_3}: ! ! {L_FONTCOLOR_1}: ! ! {L_FONTCOLOR_2}: ! ! {L_FONTCOLOR_3}: ! ! {L_SPAN_CLASS_1}: ! ! {L_SPAN_CLASS_2}: ! ! {L_SPAN_CLASS_3}: ! ! diff -crbB phpbb203/templates/subSilver/admin/user_ban_body.tpl phpbb206/templates/subSilver/admin/user_ban_body.tpl *** phpbb203/templates/subSilver/admin/user_ban_body.tpl Sun Jun 15 14:32:16 2003 --- phpbb206/templates/subSilver/admin/user_ban_body.tpl Sun Jul 20 16:37:23 2003 *************** *** 9,15 **** {L_USERNAME}: ! {S_HIDDEN_FIELDS} {L_UNBAN_USER} --- 9,15 ---- {L_USERNAME}: ! {S_HIDDEN_FIELDS} {L_UNBAN_USER} *************** *** 23,29 **** {L_IP_OR_HOSTNAME}:
{L_BAN_IP_EXPLAIN} ! {L_UNBAN_IP} --- 23,29 ---- {L_IP_OR_HOSTNAME}:
{L_BAN_IP_EXPLAIN} ! {L_UNBAN_IP} *************** *** 37,43 **** {L_EMAIL_ADDRESS}:
{L_BAN_EMAIL_EXPLAIN} ! {L_UNBAN_EMAIL} --- 37,43 ---- {L_EMAIL_ADDRESS}:
{L_BAN_EMAIL_EXPLAIN} ! {L_UNBAN_EMAIL} diff -crbB phpbb203/templates/subSilver/admin/user_edit_body.tpl phpbb206/templates/subSilver/admin/user_edit_body.tpl *** phpbb203/templates/subSilver/admin/user_edit_body.tpl Sun Jun 15 14:32:16 2003 --- phpbb206/templates/subSilver/admin/user_edit_body.tpl Sun Jul 20 16:37:23 2003 *************** *** 15,41 **** {L_USERNAME}: * ! {L_EMAIL_ADDRESS}: * ! {L_NEW_PASSWORD}: *
{L_PASSWORD_IF_CHANGED} ! {L_CONFIRM_PASSWORD}: *
{L_PASSWORD_CONFIRM_IF_CHANGED} ! --- 15,41 ---- {L_USERNAME}: * ! {L_EMAIL_ADDRESS}: * ! {L_NEW_PASSWORD}: *
{L_PASSWORD_IF_CHANGED} ! {L_CONFIRM_PASSWORD}: *
{L_PASSWORD_CONFIRM_IF_CHANGED} ! *************** *** 50,98 **** {L_ICQ_NUMBER} ! {L_AIM} ! {L_MESSENGER} ! {L_YAHOO} ! {L_WEBSITE} ! {L_LOCATION} ! {L_OCCUPATION} ! {L_INTERESTS} ! --- 50,98 ---- {L_ICQ_NUMBER} ! {L_AIM} ! {L_MESSENGER} ! {L_YAHOO} ! {L_WEBSITE} ! {L_LOCATION} ! {L_OCCUPATION} ! {L_INTERESTS} ! *************** *** 103,109 **** {BBCODE_STATUS}
{SMILIES_STATUS} ! --- 103,109 ---- {BBCODE_STATUS}
{SMILIES_STATUS} ! *************** *** 200,206 **** {L_DATE_FORMAT}
{L_DATE_FORMAT_EXPLAIN} ! --- 200,206 ---- {L_DATE_FORMAT}
{L_DATE_FORMAT_EXPLAIN} ! *************** *** 236,242 **** {L_UPLOAD_AVATAR_URL} ! --- 236,242 ---- {L_UPLOAD_AVATAR_URL} ! *************** *** 244,250 **** {L_LINK_REMOTE_AVATAR} ! --- 244,250 ---- {L_LINK_REMOTE_AVATAR} ! diff -crbB phpbb203/templates/subSilver/admin/user_email_body.tpl phpbb206/templates/subSilver/admin/user_email_body.tpl *** phpbb203/templates/subSilver/admin/user_email_body.tpl Sun Jun 15 14:32:16 2003 --- phpbb206/templates/subSilver/admin/user_email_body.tpl Sun Jul 20 16:37:23 2003 *************** *** 17,23 **** {L_EMAIL_SUBJECT} ! {L_EMAIL_MSG} --- 17,23 ---- {L_EMAIL_SUBJECT} ! {L_EMAIL_MSG} diff -crbB phpbb203/templates/subSilver/admin/words_edit_body.tpl phpbb206/templates/subSilver/admin/words_edit_body.tpl *** phpbb203/templates/subSilver/admin/words_edit_body.tpl Sun Jun 15 14:32:16 2003 --- phpbb206/templates/subSilver/admin/words_edit_body.tpl Sun Jul 20 16:37:23 2003 *************** *** 9,19 **** {L_WORD} ! {L_REPLACEMENT} ! {S_HIDDEN_FIELDS} --- 9,19 ---- {L_WORD} ! {L_REPLACEMENT} ! {S_HIDDEN_FIELDS} diff -crbB phpbb203/templates/subSilver/agreement.tpl phpbb206/templates/subSilver/agreement.tpl *** phpbb203/templates/subSilver/agreement.tpl Sun Jun 15 14:32:16 2003 --- phpbb206/templates/subSilver/agreement.tpl Sun Jul 20 16:37:23 2003 *************** *** 7,13 **** !
{SITENAME} - {REGISTRATION}
--- 7,13 ----
! --- 25,31 ---- diff -crbB phpbb203/templates/subSilver/memberlist_body.tpl phpbb206/templates/subSilver/memberlist_body.tpl *** phpbb203/templates/subSilver/memberlist_body.tpl Sun Jun 15 14:32:16 2003 --- phpbb206/templates/subSilver/memberlist_body.tpl Sun Jul 20 16:37:23 2003 *************** *** 32,38 **** !
{SITENAME} - {REGISTRATION}
diff -crbB phpbb203/templates/subSilver/error_body.tpl phpbb206/templates/subSilver/error_body.tpl *** phpbb203/templates/subSilver/error_body.tpl Sun Jun 15 14:32:16 2003 --- phpbb206/templates/subSilver/error_body.tpl Sun Jul 20 16:37:23 2003 *************** *** 6,12 **** ! --- 6,12 ---- ! diff -crbB phpbb203/templates/subSilver/groupcp_info_body.tpl phpbb206/templates/subSilver/groupcp_info_body.tpl *** phpbb203/templates/subSilver/groupcp_info_body.tpl Sun Jun 15 14:32:16 2003 --- phpbb206/templates/subSilver/groupcp_info_body.tpl Sun Jul 20 16:37:23 2003 *************** *** 9,15 ****
 
{ERROR_MESSAGE}
  
{ERROR_MESSAGE}
 
! --- 9,15 ----
{L_GROUP_INFORMATION}
{L_GROUP_NAME}:
! diff -crbB phpbb203/templates/subSilver/groupcp_pending_info.tpl phpbb206/templates/subSilver/groupcp_pending_info.tpl *** phpbb203/templates/subSilver/groupcp_pending_info.tpl Sun Jun 15 14:32:16 2003 --- phpbb206/templates/subSilver/groupcp_pending_info.tpl Sun Jul 20 16:37:23 2003 *************** *** 23,29 **** ! --- 23,29 ---- ! diff -crbB phpbb203/templates/subSilver/index_body.tpl phpbb206/templates/subSilver/index_body.tpl *** phpbb203/templates/subSilver/index_body.tpl Sun Jun 15 14:32:17 2003 --- phpbb206/templates/subSilver/index_body.tpl Sun Jul 20 16:37:23 2003 *************** *** 61,67 **** --- 61,69 ----
{L_GROUP_INFORMATION}
{L_GROUP_NAME}:{pending_members_row.FROM} {pending_members_row.EMAIL_IMG} {pending_members_row.WWW_IMG}
{pending_members_row.FROM} {pending_members_row.EMAIL_IMG} {pending_members_row.WWW_IMG}
+ +
{L_ONLINE_EXPLAIN}
*************** *** 74,80 ****
{L_USERNAME}:    {L_PASSWORD}: !      {L_AUTO_LOGIN}     --- 76,82 ---- {L_USERNAME}:    {L_PASSWORD}: !      {L_AUTO_LOGIN}     diff -crbB phpbb203/templates/subSilver/login_body.tpl phpbb206/templates/subSilver/login_body.tpl *** phpbb203/templates/subSilver/login_body.tpl Sun Jun 15 14:32:17 2003 --- phpbb206/templates/subSilver/login_body.tpl Sun Jul 20 16:37:23 2003 *************** *** 25,31 ****
{L_PASSWORD}: !
{L_PASSWORD}: !
 
--- 32,38 ---- !
 
diff -crbB phpbb203/templates/subSilver/modcp_split.tpl phpbb206/templates/subSilver/modcp_split.tpl *** phpbb203/templates/subSilver/modcp_split.tpl Sun Jun 15 14:32:17 2003 --- phpbb206/templates/subSilver/modcp_split.tpl Sun Jul 20 16:37:23 2003 *************** *** 15,27 **** ! ! ! !
{L_SPLIT_SUBJECT} ! !
{L_SPLIT_FORUM}{S_FORUM_SELECT}
--- 15,25 ----
{L_SPLIT_SUBJECT}
{L_SPLIT_FORUM}{S_FORUM_SELECT}
diff -crbB phpbb203/templates/subSilver/overall_header.tpl phpbb206/templates/subSilver/overall_header.tpl *** phpbb203/templates/subSilver/overall_header.tpl Sun Jun 15 14:32:16 2003 --- phpbb206/templates/subSilver/overall_header.tpl Sun Jul 20 16:37:23 2003 *************** *** 220,226 **** ! --- 220,226 ---- ! diff -crbB phpbb203/templates/subSilver/posting_body.tpl phpbb206/templates/subSilver/posting_body.tpl *** phpbb203/templates/subSilver/posting_body.tpl Sun Jun 15 14:32:16 2003 --- phpbb206/templates/subSilver/posting_body.tpl Sun Jul 20 16:37:23 2003 *************** *** 17,22 **** --- 17,23 ---- var is_nav = ((clientPC.indexOf('mozilla')!=-1) && (clientPC.indexOf('spoofer')==-1) && (clientPC.indexOf('compatible') == -1) && (clientPC.indexOf('opera')==-1) && (clientPC.indexOf('webtv')==-1) && (clientPC.indexOf('hotjava')==-1)); + var is_moz = 0; var is_win = ((clientPC.indexOf("win")!=-1) || (clientPC.indexOf("16bit") != -1)); var is_mac = (clientPC.indexOf("mac")!=-1); *************** *** 92,130 **** } function emoticon(text) { text = ' ' + text + ' '; ! if (document.post.message.createTextRange && document.post.message.caretPos) { ! var caretPos = document.post.message.caretPos; ! caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text; ! document.post.message.focus(); } else { ! document.post.message.value += text; ! document.post.message.focus(); } } function bbfontstyle(bbopen, bbclose) { if ((clientVer >= 4) && is_ie && is_win) { theSelection = document.selection.createRange().text; if (!theSelection) { ! document.post.message.value += bbopen + bbclose; ! document.post.message.focus(); return; } document.selection.createRange().text = bbopen + theSelection + bbclose; ! document.post.message.focus(); return; ! } else { ! document.post.message.value += bbopen + bbclose; ! document.post.message.focus(); return; } ! storeCaret(document.post.message); } function bbstyle(bbnumber) { donotinsert = false; theSelection = false; bblast = 0; --- 92,141 ---- } function emoticon(text) { + var txtarea = document.post.message; text = ' ' + text + ' '; ! if (txtarea.createTextRange && txtarea.caretPos) { ! var caretPos = txtarea.caretPos; ! caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text; ! txtarea.focus(); } else { ! txtarea.value += text; ! txtarea.focus(); } } function bbfontstyle(bbopen, bbclose) { + var txtarea = document.post.message; + if ((clientVer >= 4) && is_ie && is_win) { theSelection = document.selection.createRange().text; if (!theSelection) { ! txtarea.value += bbopen + bbclose; ! txtarea.focus(); return; } document.selection.createRange().text = bbopen + theSelection + bbclose; ! txtarea.focus(); return; ! } ! else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0)) ! { ! mozWrap(txtarea, bbopen, bbclose); return; } ! else ! { ! txtarea.value += bbopen + bbclose; ! txtarea.focus(); ! } ! storeCaret(txtarea); } function bbstyle(bbnumber) { + var txtarea = document.post.message; + txtarea.focus(); donotinsert = false; theSelection = false; bblast = 0; *************** *** 132,156 **** if (bbnumber == -1) { // Close all open tags & default button names while (bbcode[0]) { butnumber = arraypop(bbcode) - 1; ! document.post.message.value += bbtags[butnumber + 1]; buttext = eval('document.post.addbbcode' + butnumber + '.value'); eval('document.post.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"'); } imageTag = false; // All tags are closed including image tags :D ! document.post.message.focus(); return; } if ((clientVer >= 4) && is_ie && is_win) theSelection = document.selection.createRange().text; // Get text selection - if (theSelection) { // Add tags around selection document.selection.createRange().text = bbtags[bbnumber] + theSelection + bbtags[bbnumber+1]; ! document.post.message.focus(); theSelection = ''; return; } // Find last occurance of an open tag the same as the one just clicked for (i = 0; i < bbcode.length; i++) { --- 143,173 ---- if (bbnumber == -1) { // Close all open tags & default button names while (bbcode[0]) { butnumber = arraypop(bbcode) - 1; ! txtarea.value += bbtags[butnumber + 1]; buttext = eval('document.post.addbbcode' + butnumber + '.value'); eval('document.post.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"'); } imageTag = false; // All tags are closed including image tags :D ! txtarea.focus(); return; } if ((clientVer >= 4) && is_ie && is_win) + { theSelection = document.selection.createRange().text; // Get text selection if (theSelection) { // Add tags around selection document.selection.createRange().text = bbtags[bbnumber] + theSelection + bbtags[bbnumber+1]; ! txtarea.focus(); theSelection = ''; return; } + } + else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0)) + { + mozWrap(txtarea, bbtags[bbnumber], bbtags[bbnumber+1]); + return; + } // Find last occurance of an open tag the same as the one just clicked for (i = 0; i < bbcode.length; i++) { *************** *** 163,193 **** if (donotinsert) { // Close all open tags up to the one just clicked & default button names while (bbcode[bblast]) { butnumber = arraypop(bbcode) - 1; ! document.post.message.value += bbtags[butnumber + 1]; buttext = eval('document.post.addbbcode' + butnumber + '.value'); eval('document.post.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"'); imageTag = false; } ! document.post.message.focus(); return; } else { // Open tags if (imageTag && (bbnumber != 14)) { // Close image tag before adding another ! document.post.message.value += bbtags[15]; lastValue = arraypop(bbcode) - 1; // Remove the close image tag from the list document.post.addbbcode14.value = "Img"; // Return button back to normal state imageTag = false; } // Open tag ! document.post.message.value += bbtags[bbnumber]; if ((bbnumber == 14) && (imageTag == false)) imageTag = 1; // Check to stop additional tags after an unclosed image tag arraypush(bbcode,bbnumber+1); eval('document.post.addbbcode'+bbnumber+'.value += "*"'); ! document.post.message.focus(); return; } ! storeCaret(document.post.message); } // Insert at Claret position. Code from --- 180,226 ---- if (donotinsert) { // Close all open tags up to the one just clicked & default button names while (bbcode[bblast]) { butnumber = arraypop(bbcode) - 1; ! txtarea.value += bbtags[butnumber + 1]; buttext = eval('document.post.addbbcode' + butnumber + '.value'); eval('document.post.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"'); imageTag = false; } ! txtarea.focus(); return; } else { // Open tags if (imageTag && (bbnumber != 14)) { // Close image tag before adding another ! txtarea.value += bbtags[15]; lastValue = arraypop(bbcode) - 1; // Remove the close image tag from the list document.post.addbbcode14.value = "Img"; // Return button back to normal state imageTag = false; } // Open tag ! txtarea.value += bbtags[bbnumber]; if ((bbnumber == 14) && (imageTag == false)) imageTag = 1; // Check to stop additional tags after an unclosed image tag arraypush(bbcode,bbnumber+1); eval('document.post.addbbcode'+bbnumber+'.value += "*"'); ! txtarea.focus(); return; } ! storeCaret(txtarea); ! } ! ! // From http://www.massless.org/mozedit/ ! function mozWrap(txtarea, open, close) ! { ! var selLength = txtarea.textLength; ! var selStart = txtarea.selectionStart; ! var selEnd = txtarea.selectionEnd; ! if (selEnd == 1 || selEnd == 2) ! selEnd = selLength; ! ! var s1 = (txtarea.value).substring(0,selStart); ! var s2 = (txtarea.value).substring(selStart, selEnd) ! var s3 = (txtarea.value).substring(selEnd, selLength); ! txtarea.value = s1 + open + s2 + close + s3; ! return; } // Insert at Claret position. Code from *************** *** 323,329 ****
 {L_FONT_COLOR}: !
 {L_FONT_COLOR}: ! ! !
{BOX_SIZE_STATUS}
--- 32,41 ----
{INBOX_LIMIT_PERCENT}
! !
{BOX_SIZE_STATUS}
diff -crbB phpbb203/templates/subSilver/privmsgs_read_body.tpl phpbb206/templates/subSilver/privmsgs_read_body.tpl *** phpbb203/templates/subSilver/privmsgs_read_body.tpl Sun Jun 15 14:32:17 2003 --- phpbb206/templates/subSilver/privmsgs_read_body.tpl Sun Jul 20 16:37:23 2003 *************** *** 53,59 ****
{INBOX_LIMIT_PERCENT}{PROFILE_IMG} {PM_IMG} {EMAIL_IMG} {WWW_IMG} {AIM_IMG} {YIM_IMG} {MSN_IMG}