|
From: Paul S. O. <ps...@us...> - 2002-03-31 00:06:38
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv12947/includes
Modified Files:
functions.php functions_search.php page_header.php
topic_review.php usercp_avatar.php usercp_email.php
usercp_register.php usercp_sendpasswd.php
usercp_viewprofile.php
Log Message:
pre-freeze on main templates, various bug fixes (highlighting search results, various search related issues, blah blah). These updates need _thorough_ checking, quickly
Index: functions.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/functions.php,v
retrieving revision 1.131
retrieving revision 1.132
diff -C2 -r1.131 -r1.132
*** functions.php 25 Mar 2002 12:41:41 -0000 1.131
--- functions.php 31 Mar 2002 00:06:34 -0000 1.132
***************
*** 91,97 ****
}
! function make_jumpbox($match_forum_id = 0)
{
! global $lang, $db, $SID, $nav_links, $phpEx;
$sql = "SELECT c.cat_id, c.cat_title, c.cat_order
--- 91,97 ----
}
! function make_jumpbox($action, $match_forum_id = 0)
{
! global $template, $lang, $db, $SID, $nav_links, $phpEx;
$sql = "SELECT c.cat_id, c.cat_title, c.cat_order
***************
*** 175,179 ****
}
! return $boxstring;
}
--- 175,192 ----
}
! $template->set_filenames(array(
! 'jumpbox' => 'jumpbox.tpl')
! );
! $template->assign_vars(array(
! 'L_GO' => $lang['Go'],
! 'L_JUMP_TO' => $lang['Jump_to'],
! 'L_SELECT_FORUM' => $lang['Select_forum'],
!
! 'S_JUMPBOX_SELECT' => $boxstring,
! 'S_JUMPBOX_ACTION' => append_sid($action))
! );
! $template->assign_var_from_handle('JUMPBOX', 'jumpbox');
!
! return;
}
Index: functions_search.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/functions_search.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** functions_search.php 22 Mar 2002 17:53:28 -0000 1.6
--- functions_search.php 31 Mar 2002 00:06:34 -0000 1.7
***************
*** 23,40 ****
{
// Weird, $init_match doesn't work with static when double quotes (") are used...
! static $drop_char_match = array('^', '$', '&', '(', ')', '<', '>', '`', "'", '|', ',', '@', '_', '?', '%', '-', '~', '+', '.', '[', ']', '{', '}', ':', '\\', '/', '=', '#', '\'', ';', '!');
! static $drop_char_replace = array(' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' , ' ', ' ', ' ', ' ', ' ', ' ');
!
! // static $accent_match = array("ß", "à", "á", "â", "ã", "ä", "å", "æ", "ç", "è", "é", "ê", "ë", "ì", "í", "î", "ï", "ð", "ñ", "ò", "ó", "ô", "õ", "ö", "ø", "ù", "ú", "û", "ü", "ý", "þ", "ÿ");
! // static $accent_replace = array("s", "a", "a", "a", "a", "a", "a", "a", "c", "e", "e", "e", "e", "i", "i", "i", "i", "o", "n", "o", "o", "o", "o", "o", "o", "u", "u", "u", "u", "y", "t", "y");
$entry = ' ' . strip_tags(strtolower($entry)) . ' ';
! for($i = 0; $i < count($accent_match); $i++)
! {
! $entry = str_replace($accent_match[$i], $accent_replace[$i], $entry);
! }
!
! if( $mode == 'post' )
{
// Replace line endings by a space
--- 23,32 ----
{
// Weird, $init_match doesn't work with static when double quotes (") are used...
! static $drop_char_match = array('^', '$', '&', '(', ')', '<', '>', '`', '\'', '"', '|', ',', '@', '_', '?', '%', '-', '~', '+', '.', '[', ']', '{', '}', ':', '\\', '/', '=', '#', '\'', ';', '!');
! static $drop_char_replace = array(' ', ' ', ' ', ' ', ' ', ' ', ' ', '', '', ' ', ' ', ' ', ' ', '', ' ', ' ', '', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' , ' ', ' ', ' ', ' ', ' ', ' ');
$entry = ' ' . strip_tags(strtolower($entry)) . ' ';
! if ( $mode == 'post' )
{
// Replace line endings by a space
***************
*** 49,53 ****
$entry = preg_replace('/\[\/?[a-z\*=\+\-]+(\:?[0-9a-z]+)?:[a-z0-9]{10,}(\:[a-z0-9]+)?=?.*?\]/', ' ', $entry);
}
! else if( $mode == 'search' )
{
$entry = str_replace('+', ' and ', $entry);
--- 41,45 ----
$entry = preg_replace('/\[\/?[a-z\*=\+\-]+(\:?[0-9a-z]+)?:[a-z0-9]{10,}(\:[a-z0-9]+)?=?.*?\]/', ' ', $entry);
}
! else if ( $mode == 'search' )
{
$entry = str_replace('+', ' and ', $entry);
***************
*** 66,78 ****
}
! if( $mode == 'post' )
{
$entry = str_replace('*', ' ', $entry);
// 'words' that consist of <=3 or >=25 characters are removed.
! $entry = preg_replace('/\b([a-z0-9]{1,3}|[a-z0-9]{25,})\b/',' ', $entry);
}
! if( !empty($stopword_list) )
{
for ($j = 0; $j < count($stopword_list); $j++)
--- 58,70 ----
}
! if ( $mode == 'post' )
{
$entry = str_replace('*', ' ', $entry);
// 'words' that consist of <=3 or >=25 characters are removed.
! $entry = preg_replace('/\b([a-z0-9]{1,3}|[a-z0-9]{20,})\b/',' ', $entry);
}
! if ( !empty($stopword_list) )
{
for ($j = 0; $j < count($stopword_list); $j++)
***************
*** 87,91 ****
}
! if( !empty($synonym_list) )
{
for ($j = 0; $j < count($synonym_list); $j++)
--- 79,83 ----
}
! if ( !empty($synonym_list) )
{
for ($j = 0; $j < count($synonym_list); $j++)
***************
*** 104,108 ****
function split_words(&$entry, $mode = 'post')
{
! if( $mode == 'post' )
{
preg_match_all("/\b(\w[\w']*\w+|\w+?)\b/", $entry, $split_entries);
--- 96,100 ----
function split_words(&$entry, $mode = 'post')
{
! if ( $mode == 'post' )
{
preg_match_all("/\b(\w[\w']*\w+|\w+?)\b/", $entry, $split_entries);
***************
*** 129,136 ****
$word = array();
$word_insert_sql = array();
! while( list($word_in, $search_matches) = @each($search_raw_words) )
{
$word_insert_sql[$word_in] = '';
! if( !empty($search_matches) )
{
for ($i = 0; $i < count($search_matches); $i++)
--- 121,128 ----
$word = array();
$word_insert_sql = array();
! while ( list($word_in, $search_matches) = @each($search_raw_words) )
{
$word_insert_sql[$word_in] = '';
! if ( !empty($search_matches) )
{
for ($i = 0; $i < count($search_matches); $i++)
***************
*** 150,154 ****
}
! if( count($word) )
{
sort($word);
--- 142,146 ----
}
! if ( count($word) )
{
sort($word);
***************
*** 179,188 ****
FROM " . SEARCH_WORD_TABLE . "
WHERE word_text IN ($word_text_sql)";
! if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select words', '', __LINE__, __FILE__, $sql);
}
! while( $row = $db->sql_fetchrow($result) )
{
$check_words[$row['word_text']] = $row['word_id'];
--- 171,180 ----
FROM " . SEARCH_WORD_TABLE . "
WHERE word_text IN ($word_text_sql)";
! if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select words', '', __LINE__, __FILE__, $sql);
}
! while ( $row = $db->sql_fetchrow($result) )
{
$check_words[$row['word_text']] = $row['word_id'];
***************
*** 196,205 ****
{
$new_match = true;
! if( isset($check_words[$word[$i]]) )
{
$new_match = false;
}
! if( $new_match )
{
switch( SQL_LAYER )
--- 188,197 ----
{
$new_match = true;
! if ( isset($check_words[$word[$i]]) )
{
$new_match = false;
}
! if ( $new_match )
{
switch( SQL_LAYER )
***************
*** 207,211 ****
case 'mysql':
case 'mysql4':
! $value_sql .= ( ( $value_sql != '' ) ? ', ' : '' ) . "('" . $word[$i] . "')";
break;
case 'mssql':
--- 199,203 ----
case 'mysql':
case 'mysql4':
! $value_sql .= ( ( $value_sql != '' ) ? ', ' : '' ) . '(\'' . $word[$i] . '\')';
break;
case 'mssql':
***************
*** 239,243 ****
}
! if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not insert new word', '', __LINE__, __FILE__, $sql);
--- 231,235 ----
}
! if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not insert new word', '', __LINE__, __FILE__, $sql);
***************
*** 256,260 ****
FROM " . SEARCH_WORD_TABLE . "
WHERE word_text IN ($match_sql)";
! if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not insert new word matches', '', __LINE__, __FILE__, $sql);
--- 248,252 ----
FROM " . SEARCH_WORD_TABLE . "
WHERE word_text IN ($match_sql)";
! if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not insert new word matches', '', __LINE__, __FILE__, $sql);
***************
*** 279,283 ****
$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);
--- 271,275 ----
$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);
***************
*** 286,294 ****
$row = $db->sql_fetchrow($result);
! if( $row['total_posts'] >= 100 )
{
$common_threshold = floor($row['total_posts'] * $fraction);
! if( $mode == 'single' && count($word_id_list) )
{
$word_id_sql = '';
--- 278,286 ----
$row = $db->sql_fetchrow($result);
! if ( $row['total_posts'] >= 100 )
{
$common_threshold = floor($row['total_posts'] * $fraction);
! if ( $mode == 'single' && count($word_id_list) )
{
$word_id_sql = '';
***************
*** 313,317 ****
}
! if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain common word list', '', __LINE__, __FILE__, $sql);
--- 305,309 ----
}
! if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain common word list', '', __LINE__, __FILE__, $sql);
***************
*** 319,323 ****
$common_word_id = '';
! while( $row = $db->sql_fetchrow($result) )
{
$common_word_id .= ( ( $common_word_id != '' ) ? ', ' : '' ) . $row['word_id'];
--- 311,315 ----
$common_word_id = '';
! while ( $row = $db->sql_fetchrow($result) )
{
$common_word_id .= ( ( $common_word_id != '' ) ? ', ' : '' ) . $row['word_id'];
***************
*** 326,335 ****
$db->sql_freeresult($result);
! if( $common_word_id != '' )
{
$sql = "UPDATE " . SEARCH_WORD_TABLE . "
SET word_common = " . TRUE . "
WHERE word_id IN ($common_word_id)";
! if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not delete word list entry', '', __LINE__, __FILE__, $sql);
--- 318,327 ----
$db->sql_freeresult($result);
! if ( $common_word_id != '' )
{
$sql = "UPDATE " . SEARCH_WORD_TABLE . "
SET word_common = " . TRUE . "
WHERE word_id IN ($common_word_id)";
! if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not delete word list entry', '', __LINE__, __FILE__, $sql);
***************
*** 338,342 ****
$sql = "DELETE FROM " . SEARCH_MATCH_TABLE . "
WHERE word_id IN ($common_word_id)";
! if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not delete word match entry', '', __LINE__, __FILE__, $sql);
--- 330,334 ----
$sql = "DELETE FROM " . SEARCH_MATCH_TABLE . "
WHERE word_id IN ($common_word_id)";
! if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not delete word match entry', '', __LINE__, __FILE__, $sql);
***************
*** 354,358 ****
$words_removed = false;
! switch( SQL_LAYER )
{
case 'mysql':
--- 346,350 ----
$words_removed = false;
! switch ( SQL_LAYER )
{
case 'mysql':
***************
*** 365,369 ****
{
$word_id_sql = '';
! while( $row = $db->sql_fetchrow($result) )
{
$word_id_sql .= ( $word_id_sql != '' ) ? ', ' . $row['word_id'] : $row['word_id'];
--- 357,361 ----
{
$word_id_sql = '';
! while ( $row = $db->sql_fetchrow($result) )
{
$word_id_sql .= ( $word_id_sql != '' ) ? ', ' . $row['word_id'] : $row['word_id'];
***************
*** 378,382 ****
{
$word_id_sql = '';
! while( $row = $db->sql_fetchrow($result) )
{
$word_id_sql .= ( $word_id_sql != '' ) ? ', ' . $row['word_id'] : $row['word_id'];
--- 370,374 ----
{
$word_id_sql = '';
! while ( $row = $db->sql_fetchrow($result) )
{
$word_id_sql .= ( $word_id_sql != '' ) ? ', ' . $row['word_id'] : $row['word_id'];
***************
*** 435,444 ****
// Username search
//
! function username_search($search_match, $is_inline_review = 0, $default_list = "")
{
global $db, $board_config, $template, $lang, $images, $theme, $phpEx, $phpbb_root_path;
global $starttime;
! $author_list = '';
if ( !empty($search_match) )
{
--- 427,436 ----
// Username search
//
! function username_search($search_match)
{
global $db, $board_config, $template, $lang, $images, $theme, $phpEx, $phpbb_root_path;
global $starttime;
! $username_list = '';
if ( !empty($search_match) )
{
***************
*** 458,462 ****
do
{
! $author_list .= '<option value="' . $row['username'] . '">' .$row['username'] . '</option>';
}
while ( $row = $db->sql_fetchrow($result) );
--- 450,454 ----
do
{
! $username_list .= '<option value="' . $row['username'] . '">' . $row['username'] . '</option>';
}
while ( $row = $db->sql_fetchrow($result) );
***************
*** 464,510 ****
else
{
! $author_list = '<option>' . $lang['No_match']. '</option>';
}
-
}
! if ( !$is_inline_review )
! {
! $gen_simple_header = TRUE;
! $page_title = $lang['Search'];
! include($phpbb_root_path . 'includes/page_header.'.$phpEx);
!
! $template->set_filenames(array(
! 'search_user_body' => 'search_username.tpl')
! );
! $template->assign_vars(array(
! 'L_CLOSE_WINDOW' => $lang['Close_window'],
! 'L_SEARCH_USERNAME' => $lang['Find_username'],
! 'L_UPDATE_USERNAME' => $lang['Select_username'],
! 'L_SELECT' => $lang['Select'],
! 'L_SEARCH' => $lang['Search'],
! 'L_SEARCH_EXPLAIN' => $lang['Search_author_explain'],
! 'L_CLOSE_WINDOW' => $lang['Close_window'],
! 'S_AUTHOR_OPTIONS' => $author_list,
! 'S_SEARCH_ACTION' => append_sid("search.$phpEx?mode=searchuser"))
! );
! //
! // If we have results then dump them out and enable
! // the appropriate switch block
! //
! if ( !empty($author_list) )
! {
! $template->assign_block_vars('switch_select_name', array());
! }
! $template->pparse('search_user_body');
! include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
}
! return($author_list);
}
--- 456,496 ----
else
{
! $username_list .= '<option>' . $lang['No_match']. '</option>';
}
}
! $gen_simple_header = TRUE;
! $page_title = $lang['Search'];
! include($phpbb_root_path . 'includes/page_header.'.$phpEx);
! $template->set_filenames(array(
! 'search_user_body' => 'search_username.tpl')
! );
! $template->assign_vars(array(
! 'USERNAME' => ( !empty($search_match) ) ? $search_match : '',
! 'L_CLOSE_WINDOW' => $lang['Close_window'],
! 'L_SEARCH_USERNAME' => $lang['Find_username'],
! 'L_UPDATE_USERNAME' => $lang['Select_username'],
! 'L_SELECT' => $lang['Select'],
! 'L_SEARCH' => $lang['Search'],
! 'L_SEARCH_EXPLAIN' => $lang['Search_author_explain'],
! 'L_CLOSE_WINDOW' => $lang['Close_window'],
! 'S_USERNAME_OPTIONS' => $username_list,
! 'S_SEARCH_ACTION' => append_sid("search.$phpEx?mode=searchuser"))
! );
! if ( $username_list != '' )
! {
! $template->assign_block_vars('switch_select_name', array());
}
! $template->pparse('search_user_body');
!
! include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
!
! return;
}
Index: page_header.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/page_header.php,v
retrieving revision 1.104
retrieving revision 1.105
diff -C2 -r1.104 -r1.105
*** page_header.php 26 Mar 2002 17:47:15 -0000 1.104
--- page_header.php 31 Mar 2002 00:06:34 -0000 1.105
***************
*** 32,51 ****
//
$do_gzip_compress = FALSE;
! if($board_config['gzip_compress'])
{
$phpver = phpversion();
! if($phpver >= '4.0.4pl1')
{
! if(extension_loaded('zlib'))
{
ob_start('ob_gzhandler');
}
}
! else if($phpver > '4.0')
{
! if(strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip'))
{
! if(extension_loaded('zlib'))
{
$do_gzip_compress = TRUE;
--- 32,51 ----
//
$do_gzip_compress = FALSE;
! if ( $board_config['gzip_compress'] )
{
$phpver = phpversion();
! if ( $phpver >= '4.0.4pl1' )
{
! if ( extension_loaded('zlib') )
{
ob_start('ob_gzhandler');
}
}
! else if ( $phpver > '4.0' )
{
! if ( strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip') )
{
! if ( extension_loaded('zlib') )
{
$do_gzip_compress = TRUE;
***************
*** 69,80 ****
// Generate logged in/logged out status
//
! if($userdata['session_logged_in'])
{
! $u_login_logout = "login.$phpEx?logout=true";
! $l_login_logout = $lang['Logout'] . ' [ ' . $userdata["username"] . ' ]';
}
else
{
! $u_login_logout = "login.$phpEx";
$l_login_logout = $lang['Login'];
}
--- 69,80 ----
// Generate logged in/logged out status
//
! if ( $userdata['session_logged_in'] )
{
! $u_login_logout = 'login.'.$phpEx.'?logout=true';
! $l_login_logout = $lang['Logout'] . ' [ ' . $userdata['username'] . ' ]';
}
else
{
! $u_login_logout = 'login.'.$phpEx;
$l_login_logout = $lang['Login'];
}
***************
*** 88,92 ****
$user_forum_sql = ( !empty($forum_id) ) ? "AND ( u.user_session_page = $forum_id
OR s.session_page = $forum_id)" : '';
-
$sql = "SELECT u.username, u.user_id, u.user_allow_viewonline, u.user_level, s.session_logged_in, s.session_ip
FROM ".USERS_TABLE." u, ".SESSIONS_TABLE." s
--- 88,91 ----
***************
*** 96,101 ****
$user_forum_sql
ORDER BY u.username ASC, s.session_ip ASC";
! $result = $db->sql_query($sql);
! if(!$result)
{
message_die(GENERAL_ERROR, 'Could not obtain user/online information', '', __LINE__, __FILE__, $sql);
--- 95,99 ----
$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);
***************
*** 116,131 ****
{
// User is logged in and therefor not a guest
! if( $row['session_logged_in'] )
{
// Skip multiple sessions for one user
! if( $row['user_id'] != $prev_user_id )
{
$style_color = '';
! if( $row['user_level'] == ADMIN )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
}
! else if( $row['user_level'] == MOD )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
--- 114,129 ----
{
// User is logged in and therefor not a guest
! if ( $row['session_logged_in'] )
{
// Skip multiple sessions for one user
! if ( $row['user_id'] != $prev_user_id )
{
$style_color = '';
! if ( $row['user_level'] == ADMIN )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
}
! else if ( $row['user_level'] == MOD )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
***************
*** 133,137 ****
}
! if( $row['user_allow_viewonline'] )
{
$user_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>';
--- 131,135 ----
}
! if ( $row['user_allow_viewonline'] )
{
$user_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'>' . $row['username'] . '</a>';
***************
*** 144,157 ****
}
! if( $row['user_allow_viewonline'] || $userdata['user_level'] == ADMIN )
{
! $online_userlist .= ( $online_userlist != "" ) ? ", " . $user_online_link : $user_online_link;
}
}
}
else
{
// Skip multiple sessions for one user
! if( $row['session_ip'] != $prev_session_ip )
{
$guests_online++;
--- 142,157 ----
}
! if ( $row['user_allow_viewonline'] || $userdata['user_level'] == ADMIN )
{
! $online_userlist .= ( $online_userlist != '' ) ? ', ' . $user_online_link : $user_online_link;
}
}
+
+ $prev_user_id = $row['user_id'];
}
else
{
// Skip multiple sessions for one user
! if ( $row['session_ip'] != $prev_session_ip )
{
$guests_online++;
***************
*** 160,167 ****
$prev_session_ip = $row['session_ip'];
- $prev_user_id = $row['user_id'];
}
! if( empty($online_userlist) )
{
$online_userlist = $lang['None'];
--- 160,166 ----
$prev_session_ip = $row['session_ip'];
}
! if ( empty($online_userlist) )
{
$online_userlist = $lang['None'];
***************
*** 173,180 ****
if ( $total_online_users > $board_config['record_online_users'])
{
$sql = "UPDATE " . CONFIG_TABLE . "
SET config_value = '$total_online_users'
WHERE config_name = 'record_online_users'";
! if ( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update online user record (nr of users)', '', __LINE__, __FILE__, $sql);
--- 172,182 ----
if ( $total_online_users > $board_config['record_online_users'])
{
+ $board_config['record_online_users'] = $total_online_users;
+ $board_config['record_online_date'] = time();
+
$sql = "UPDATE " . CONFIG_TABLE . "
SET config_value = '$total_online_users'
WHERE config_name = 'record_online_users'";
! if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update online user record (nr of users)', '', __LINE__, __FILE__, $sql);
***************
*** 182,201 ****
$sql = "UPDATE " . CONFIG_TABLE . "
! SET config_value = '" . time() . "'
WHERE config_name = 'record_online_date'";
! if ( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update online user record (date)', '', __LINE__, __FILE__, $sql);
}
-
- $board_config['record_online_users'] = $total_online_users;
- $board_config['record_online_date'] = time();
}
! 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'];
--- 184,200 ----
$sql = "UPDATE " . CONFIG_TABLE . "
! SET config_value = '" . $board_config['record_online_date'] . "'
WHERE config_name = 'record_online_date'";
! if ( !$db->sql_query($sql) )
{
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'];
***************
*** 206,214 ****
}
! 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'];
--- 205,213 ----
}
! 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'];
***************
*** 219,227 ****
}
! 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'];
--- 218,226 ----
}
! 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'];
***************
*** 232,240 ****
}
! 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'];
--- 231,239 ----
}
! 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'];
***************
*** 254,270 ****
// if user is logged in
//
! if( $userdata['session_logged_in'] )
{
! if( $userdata['user_new_privmsg'] )
{
$l_message_new = ( $userdata['user_new_privmsg'] == 1 ) ? $lang['New_pm'] : $lang['New_pms'];
$l_privmsgs_text = sprintf($l_message_new, $userdata['user_new_privmsg']);
! if( $userdata['user_last_privmsg'] > $userdata['user_lastvisit'] )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_last_privmsg = " . $userdata['user_lastvisit'] . "
WHERE user_id = " . $userdata['user_id'];
! if( !$status = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update private message new/read time for user', '', __LINE__, __FILE__, $sql);
--- 253,269 ----
// if user is logged in
//
! if ( $userdata['session_logged_in'] )
{
! if ( $userdata['user_new_privmsg'] )
{
$l_message_new = ( $userdata['user_new_privmsg'] == 1 ) ? $lang['New_pm'] : $lang['New_pms'];
$l_privmsgs_text = sprintf($l_message_new, $userdata['user_new_privmsg']);
! if ( $userdata['user_last_privmsg'] > $userdata['user_lastvisit'] )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_last_privmsg = " . $userdata['user_lastvisit'] . "
WHERE user_id = " . $userdata['user_id'];
! if ( !($status = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update private message new/read time for user', '', __LINE__, __FILE__, $sql);
***************
*** 288,292 ****
}
! if( $userdata['user_unread_privmsg'] )
{
$l_message_unread = ( $userdata['user_unread_privmsg'] == 1 ) ? $lang['Unread_pm'] : $lang['Unread_pms'];
--- 287,291 ----
}
! if ( $userdata['user_unread_privmsg'] )
{
$l_message_unread = ( $userdata['user_unread_privmsg'] == 1 ) ? $lang['Unread_pm'] : $lang['Unread_pms'];
***************
*** 302,306 ****
$icon_pm = $images['pm_no_new_msg'];
$l_privmsgs_text = $lang['Login_check_pm'];
! $l_privmsgs_text_unread = "";
$s_privmsg_new = 0;
}
--- 301,305 ----
$icon_pm = $images['pm_no_new_msg'];
$l_privmsgs_text = $lang['Login_check_pm'];
! $l_privmsgs_text_unread = '';
$s_privmsg_new = 0;
}
***************
*** 311,317 ****
$nav_links_html = '';
$nav_link_proto = '<link rel="%s" href="%s" title="%s" />' . "\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']);
--- 310,316 ----
$nav_links_html = '';
$nav_link_proto = '<link rel="%s" href="%s" title="%s" />' . "\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']);
***************
*** 320,324 ****
{
// We have a nested array, used for items like <link rel='chapter'> that can occur more than once.
! while(list(,$nested_array) = each($nav_array) )
{
$nav_links_html .= sprintf($nav_link_proto, $nav_item, $nested_array['url'], $nested_array['title']);
--- 319,323 ----
{
// We have a nested array, used for items like <link rel='chapter'> that can occur more than once.
! while( list(,$nested_array) = each($nav_array) )
{
$nav_links_html .= sprintf($nav_link_proto, $nav_item, $nested_array['url'], $nested_array['title']);
***************
*** 329,334 ****
//
// 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
! // should all S_x_ACTIONS for forms.
//
$template->assign_vars(array(
--- 328,332 ----
//
// The following assigns all _common_ variables that may be used at any point
! // in a template.
//
$template->assign_vars(array(
***************
*** 336,389 ****
'SITE_DESCRIPTION' => $board_config['site_desc'],
'PAGE_TITLE' => $page_title,
'TOTAL_USERS_ONLINE' => $l_online_users,
! 'LOGGED_IN_USER_LIST' => $online_userlist,
'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text,
'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread,
'PRIVATE_MESSAGE_NEW_FLAG' => $s_privmsg_new,
- 'LAST_VISIT_DATE' => sprintf($lang['You_last_visit'], $s_last_visit),
- 'CURRENT_TIME' => sprintf($lang['Current_time'], create_date($board_config['default_dateformat'], time(), $board_config['board_timezone'])),
'PRIVMSG_IMG' => $icon_pm,
! 'L_USERNAME' => $lang['Username'],
! 'L_PASSWORD' => $lang['Password'],
! 'L_LOGIN' => $lang['Login'],
! 'L_LOG_ME_IN' => $lang['Log_me_in'],
! 'L_INDEX' => sprintf($lang['Forum_Index'], $board_config['sitename']),
! 'L_REGISTER' => $lang['Register'],
! 'L_PROFILE' => $lang['Profile'],
! 'L_SEARCH' => $lang['Search'],
! 'L_PRIVATEMSGS' => $lang['Private_Messages'],
! 'L_WHO_IS_ONLINE' => $lang['Who_is_Online'],
! 'L_MEMBERLIST' => $lang['Memberlist'],
! 'L_FAQ' => $lang['FAQ'],
! 'L_USERGROUPS' => $lang['Usergroups'],
! 'L_FORUM' => $lang['Forum'],
! 'L_TOPICS' => $lang['Topics'],
! 'L_REPLIES' => $lang['Replies'],
! 'L_VIEWS' => $lang['Views'],
! 'L_POSTS' => $lang['Posts'],
! 'L_LASTPOST' => $lang['Last_Post'],
! 'L_NO_NEW_POSTS' => $lang['No_new_posts'],
! 'L_NEW_POSTS' => $lang['New_posts'],
! 'L_NO_NEW_POSTS_HOT' => $lang['No_new_posts_hot'],
! 'L_NEW_POSTS_HOT' => $lang['New_posts_hot'],
! 'L_NO_NEW_POSTS_LOCKED' => $lang['No_new_posts_locked'],
! 'L_NEW_POSTS_LOCKED' => $lang['New_posts_locked'],
! 'L_ANNOUNCEMENT' => $lang['Post_Announcement'],
! 'L_STICKY' => $lang['Post_Sticky'],
! 'L_POSTED' => $lang['Posted'],
! 'L_JOINED' => $lang['Joined'],
! 'L_AUTO_LOGIN' => $lang['Log_me_in'],
! 'L_AUTHOR' => $lang['Author'],
! 'L_SUBJECT' => $lang['Subject'],
! 'L_MESSAGE' => $lang['Message'],
! 'L_LOGIN_LOGOUT' => $l_login_logout,
'L_SEARCH_NEW' => $lang['Search_new'],
! 'L_SEARCH_UNANSWERED' => $lang['Search_unanswered'],
'L_SEARCH_SELF' => $lang['Search_your_posts'],
'L_WHOSONLINE_ADMIN' => sprintf($lang['Admin_online_color'], '<span style="color:#' . $theme['fontcolor3'] . '">', '</span>'),
'L_WHOSONLINE_MOD' => sprintf($lang['Mod_online_color'], '<span style="color:#' . $theme['fontcolor2'] . '">', '</span>'),
- 'L_RECORD_USERS' => sprintf($lang['Record_online_users'], $board_config['record_online_users'], create_date($board_config['default_dateformat'], $board_config['record_online_date'], $board_config['board_timezone'])),
'U_SEARCH_UNANSWERED' => append_sid('search.'.$phpEx.'?search_id=unanswered'),
--- 334,368 ----
'SITE_DESCRIPTION' => $board_config['site_desc'],
'PAGE_TITLE' => $page_title,
+ 'LAST_VISIT_DATE' => sprintf($lang['You_last_visit'], $s_last_visit),
+ 'CURRENT_TIME' => sprintf($lang['Current_time'], create_date($board_config['default_dateformat'], time(), $board_config['board_timezone'])),
'TOTAL_USERS_ONLINE' => $l_online_users,
! 'LOGGED_IN_USER_LIST' => $online_userlist,
! 'RECORD_USERS' => sprintf($lang['Record_online_users'], $board_config['record_online_users'], create_date($board_config['default_dateformat'], $board_config['record_online_date'], $board_config['board_timezone'])),
'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text,
'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread,
'PRIVATE_MESSAGE_NEW_FLAG' => $s_privmsg_new,
'PRIVMSG_IMG' => $icon_pm,
! 'L_USERNAME' => $lang['Username'],
! 'L_PASSWORD' => $lang['Password'],
! 'L_LOGIN_LOGOUT' => $l_login_logout,
! 'L_LOGIN' => $lang['Login'],
! 'L_LOG_ME_IN' => $lang['Log_me_in'],
! 'L_AUTO_LOGIN' => $lang['Log_me_in'],
! 'L_INDEX' => sprintf($lang['Forum_Index'], $board_config['sitename']),
! 'L_REGISTER' => $lang['Register'],
! 'L_PROFILE' => $lang['Profile'],
! 'L_SEARCH' => $lang['Search'],
! 'L_PRIVATEMSGS' => $lang['Private_Messages'],
! 'L_WHO_IS_ONLINE' => $lang['Who_is_Online'],
! 'L_MEMBERLIST' => $lang['Memberlist'],
! 'L_FAQ' => $lang['FAQ'],
! 'L_USERGROUPS' => $lang['Usergroups'],
'L_SEARCH_NEW' => $lang['Search_new'],
! 'L_SEARCH_UNANSWERED' => $lang['Search_unanswered'],
'L_SEARCH_SELF' => $lang['Search_your_posts'],
'L_WHOSONLINE_ADMIN' => sprintf($lang['Admin_online_color'], '<span style="color:#' . $theme['fontcolor3'] . '">', '</span>'),
'L_WHOSONLINE_MOD' => sprintf($lang['Mod_online_color'], '<span style="color:#' . $theme['fontcolor2'] . '">', '</span>'),
'U_SEARCH_UNANSWERED' => append_sid('search.'.$phpEx.'?search_id=unanswered'),
***************
*** 456,460 ****
// Login box?
//
! if( !$userdata['session_logged_in'] )
{
$template->assign_block_vars('switch_user_logged_out', array());
--- 435,439 ----
// Login box?
//
! if ( !$userdata['session_logged_in'] )
{
$template->assign_block_vars('switch_user_logged_out', array());
***************
*** 464,485 ****
$template->assign_block_vars('switch_user_logged_in', array());
! if( !empty($userdata['user_popup_pm']) )
{
$template->assign_block_vars('switch_enable_pm_popup', array());
}
}
! if ( $HTTP_SERVER_VARS['REQUEST_METHOD'] == 'POST' )
! {
! header ('Cache-Control: private, must-revalidate, max-age=25');
! }
! else
{
header ('Cache-Control: private, no-cache, must-revalidate, pre-check=2, post-check=2, max-age=25');
header ('Pragma: no-cache');
- 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');
! ?>
--- 443,461 ----
$template->assign_block_vars('switch_user_logged_in', array());
! if ( !empty($userdata['user_popup_pm']) )
{
$template->assign_block_vars('switch_enable_pm_popup', array());
}
}
!
! if ( getenv('REQUEST_METHOD') != 'POST' )
{
header ('Cache-Control: private, no-cache, must-revalidate, pre-check=2, post-check=2, max-age=25');
header ('Pragma: no-cache');
}
+ 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');
! ?>
\ No newline at end of file
Index: topic_review.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/topic_review.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** topic_review.php 18 Mar 2002 23:56:36 -0000 1.4
--- topic_review.php 31 Mar 2002 00:06:34 -0000 1.5
***************
*** 29,35 ****
global $starttime;
! if( !$is_inline_review )
{
! if( !isset($topic_id) )
{
message_die(GENERAL_MESSAGE, 'Topic_not_exist');
--- 29,35 ----
global $starttime;
! if ( !$is_inline_review )
{
! if ( !isset($topic_id) )
{
message_die(GENERAL_MESSAGE, 'Topic_not_exist');
***************
*** 43,52 ****
WHERE t.topic_id = $topic_id
AND f.forum_id = t.forum_id";
! if( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, "Couldn't obtain topic information", "", __LINE__, __FILE__, $sql);
}
! if( !($forum_row = $db->sql_fetchrow($result)) )
{
message_die(GENERAL_MESSAGE, 'Topic_post_not_exist');
--- 43,52 ----
WHERE t.topic_id = $topic_id
AND f.forum_id = t.forum_id";
! if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, 'Could not obtain topic information', '', __LINE__, __FILE__, $sql);
}
! if ( !($forum_row = $db->sql_fetchrow($result)) )
{
message_die(GENERAL_MESSAGE, 'Topic_post_not_exist');
***************
*** 77,81 ****
// Define censored word matches
//
! if( empty($orig_word) && empty($replacement_word) )
{
$orig_word = array();
--- 77,81 ----
// Define censored word matches
//
! if ( empty($orig_word) && empty($replacement_word) )
{
$orig_word = array();
***************
*** 88,100 ****
// Dump out the page header and load viewtopic body template
//
! if( !$is_inline_review )
{
$gen_simple_header = TRUE;
! $page_title = $lang['Topic_review'] ." - $topic_title";
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
! "reviewbody" => "posting_topic_review.tpl")
);
}
--- 88,100 ----
// Dump out the page header and load viewtopic body template
//
! if ( !$is_inline_review )
{
$gen_simple_header = TRUE;
! $page_title = $lang['Topic_review'] . ' - ' . $topic_title;
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
! 'reviewbody' => 'posting_topic_review.tpl')
);
}
***************
*** 110,116 ****
ORDER BY p.post_time DESC
LIMIT " . $board_config['posts_per_page'];
! if( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, "Couldn't obtain post/user information.", "", __LINE__, __FILE__, $sql);
}
--- 110,116 ----
ORDER BY p.post_time DESC
LIMIT " . $board_config['posts_per_page'];
! if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, 'Could not obtain post/user information', '', __LINE__, __FILE__, $sql);
}
***************
*** 121,124 ****
--- 121,127 ----
if ( $row = $db->sql_fetchrow($result) )
{
+ $mini_post_img = $images['icon_minipost'];
+ $mini_post_alt = $lang['Post'];
+
$i = 0;
do
***************
*** 129,134 ****
$post_date = create_date($board_config['default_dateformat'], $row['post_time'], $board_config['board_timezone']);
- $mini_post_img = '<img src="' . $images['icon_minipost'] . '" alt="' . $lang['Post'] . '" />';
-
//
// Handle anon users posting with usernames
--- 132,135 ----
***************
*** 140,144 ****
}
! $post_subject = ( $row['post_subject'] != "" ) ? $row['post_subject'] : "";
$message = $row['post_text'];
--- 141,145 ----
}
! $post_subject = ( $row['post_subject'] != '' ) ? $row['post_subject'] : '';
$message = $row['post_text'];
***************
*** 151,160 ****
if ( !$board_config['allow_html'] && $row['enable_html'] )
{
! $message = preg_replace("#(<)([\/]?.*?)(>)#is", "<\\2>", $message);
}
if ( $bbcode_uid != "" )
{
! $message = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($message, $bbcode_uid) : preg_replace("/\:[0-9a-z\:]+\]/si", "]", $message);
}
--- 152,161 ----
if ( !$board_config['allow_html'] && $row['enable_html'] )
{
! $message = preg_replace('#(<)([\/]?.*?)(>)#is', '<\2>', $message);
}
if ( $bbcode_uid != "" )
{
! $message = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($message, $bbcode_uid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $message);
}
***************
*** 172,176 ****
}
! $message = str_replace("\n", "<br />", $message);
//
--- 173,177 ----
}
! $message = str_replace("\n", '<br />', $message);
//
***************
*** 181,193 ****
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
! $template->assign_block_vars("postrow", array(
! "ROW_COLOR" => "#" . $row_color,
! "ROW_CLASS" => $row_class,
!
! "MINI_POST_IMG" => $mini_post_img,
! "POSTER_NAME" => $poster,
! "POST_DATE" => $post_date,
! "POST_SUBJECT" => $post_subject,
! "MESSAGE" => $message)
);
--- 182,196 ----
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
! $template->assign_block_vars('postrow', array(
! 'ROW_COLOR' => '#' . $row_color,
! 'ROW_CLASS' => $row_class,
!
! 'MINI_POST_IMG' => $mini_post_img,
! 'POSTER_NAME' => $poster,
! 'POST_DATE' => $post_date,
! 'POST_SUBJECT' => $post_subject,
! 'MESSAGE' => $message,
!
! 'L_MINI_POST_ALT' => $mini_post_alt)
);
***************
*** 198,213 ****
else
{
! message_die(GENERAL_MESSAGE, 'Topic_post_not_exist', "", __LINE__, __FILE__, $sql);
}
$template->assign_vars(array(
! "L_POSTED" => $lang['Posted'],
! "L_POST_SUBJECT" => $lang['Post_subject'],
! "L_TOPIC_REVIEW" => $lang['Topic_review'])
);
if ( !$is_inline_review )
{
! $template->pparse("reviewbody");
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
}
--- 201,218 ----
else
{
! message_die(GENERAL_MESSAGE, 'Topic_post_not_exist', '', __LINE__, __FILE__, $sql);
}
$template->assign_vars(array(
! 'L_AUTHOR' => $lang['Author'],
! 'L_MESSAGE' => $lang['Message'],
! 'L_POSTED' => $lang['Posted'],
! 'L_POST_SUBJECT' => $lang['Post_subject'],
! 'L_TOPIC_REVIEW' => $lang['Topic_review'])
);
if ( !$is_inline_review )
{
! $template->pparse('reviewbody');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
}
Index: usercp_avatar.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/usercp_avatar.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** usercp_avatar.php 23 Mar 2002 14:56:51 -0000 1.7
--- usercp_avatar.php 31 Mar 2002 00:06:34 -0000 1.8
***************
*** 279,283 ****
@reset($avatar_images);
! $s_categories = '';
while( list($key) = each($avatar_images) )
{
--- 279,283 ----
@reset($avatar_images);
! $s_categories = '<select name="avatarcategory">';
while( list($key) = each($avatar_images) )
{
***************
*** 288,291 ****
--- 288,292 ----
}
}
+ $s_categories .= '</select>';
$s_colspan = 0;
***************
*** 324,328 ****
'L_CATEGORY' => $lang['Select_category'],
! 'S_OPTIONS_CATEGORIES' => $s_categories,
'S_COLSPAN' => $s_colspan,
'S_PROFILE_ACTION' => append_sid("profile.$phpEx?mode=$mode"),
--- 325,329 ----
'L_CATEGORY' => $lang['Select_category'],
! 'S_CATEGORY_SELECT' => $s_categories,
'S_COLSPAN' => $s_colspan,
'S_PROFILE_ACTION' => append_sid("profile.$phpEx?mode=$mode"),
Index: usercp_email.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/usercp_email.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** usercp_email.php 22 Mar 2002 19:32:35 -0000 1.6
--- usercp_email.php 31 Mar 2002 00:06:34 -0000 1.7
***************
*** 95,108 ****
$emailer = new emailer($board_config['smtp_delivery']);
! $email_headers = "From: " . $userdata['user_email'] . "\n";
if ( !empty($HTTP_POST_VARS['cc_email']) )
{
$email_headers .= "Cc: " . $userdata['user_email'] . "\n";
}
! $email_headers .= "Return-Path: " . $userdata['user_email'] . "\n";
! $email_headers .= "X-AntiAbuse: Board servername - " . $server_name . "\n";
! $email_headers .= "X-AntiAbuse: User_id - " . $userdata['user_id'] . "\n";
! $email_headers .= "X-AntiAbuse: Username - " . $userdata['username'] . "\n";
! $email_headers .= "X-AntiAbuse: User IP - " . decode_ip($user_ip) . "\r\n";
$emailer->use_template('profile_send_email', $user_lang);
--- 95,108 ----
$emailer = new emailer($board_config['smtp_delivery']);
! $email_headers = 'From: ' . $userdata['user_email'] . "\n";
if ( !empty($HTTP_POST_VARS['cc_email']) )
{
$email_headers .= "Cc: " . $userdata['user_email'] . "\n";
}
! $email_headers .= 'Return-Path: ' . $userdata['user_email'] . "\n";
! $email_headers .= 'X-AntiAbuse: Board servername - ' . $server_name . "\n";
! $email_headers .= 'X-AntiAbuse: User_id - ' . $userdata['user_id'] . "\n";
! $email_headers .= 'X-AntiAbuse: Username - ' . $userdata['username'] . "\n";
! $email_headers .= 'X-AntiAbuse: User IP - ' . decode_ip($user_ip) . "\r\n";
$emailer->use_template('profile_send_email', $user_lang);
***************
*** 139,156 ****
$template->set_filenames(array(
! 'body' => 'profile_send_email.tpl',
! 'jumpbox' => 'jumpbox.tpl')
);
!
! $jumpbox = make_jumpbox();
! $template->assign_vars(array(
! 'L_GO' => $lang['Go'],
! 'L_JUMP_TO' => $lang['Jump_to'],
! 'L_SELECT_FORUM' => $lang['Select_forum'],
!
! 'S_JUMPBOX_LIST' => $jumpbox,
! 'S_JUMPBOX_ACTION' => append_sid("viewforum.$phpEx"))
! );
! $template->assign_var_from_handle('JUMPBOX', 'jumpbox');
if ( $error )
--- 139,145 ----
$template->set_filenames(array(
! 'body' => 'profile_send_email.tpl')
);
! make_jumpbox('viewforum.'.$phpEx);
if ( $error )
***************
*** 165,177 ****
}
- if ( $userdata['user_sig'] != '' )
- {
- $template->assign_block_vars('signature_checkbox', array());
- }
-
$template->assign_vars(array(
'USERNAME' => $username,
- 'S_SIGNATURE_CHECKED' => ( $attach_sig ) ? 'checked="checked"' : '',
'S_POST_ACTION' => append_sid("profile.$phpEx?&mode=email&" . POST_USERS_URL . "=$user_id"),
--- 154,160 ----
***************
*** 185,189 ****
'L_OPTIONS' => $lang['Options'],
'L_CC_EMAIL' => $lang['CC_email'],
- 'L_NOTIFY_ON_REPLY' => $lang['Notify'],
'L_SPELLCHECK' => $lang['Spellcheck'],
'L_SEND_EMAIL' => $lang['Send_email'])
--- 168,171 ----
***************
*** 204,206 ****
}
! ?>
--- 186,188 ----
}
! ?>
\ No newline at end of file
Index: usercp_register.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/usercp_register.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** usercp_register.php 29 Mar 2002 00:24:13 -0000 1.17
--- usercp_register.php 31 Mar 2002 00:06:34 -0000 1.18
***************
*** 681,698 ****
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
! $template->set_filenames(array(
! "jumpbox" => "jumpbox.tpl")
! );
!
! $jumpbox = make_jumpbox();
! $template->assign_vars(array(
! 'L_GO' => $lang['Go'],
! 'L_JUMP_TO' => $lang['Jump_to'],
! 'L_SELECT_FORUM' => $lang['Select_forum'],
!
! 'S_JUMPBOX_LIST' => $jumpbox,
! 'S_JUMPBOX_ACTION' => append_sid('viewforum.$phpEx'))
! );
! $template->assign_var_from_handle('JUMPBOX', 'jumpbox');
if ( $mode == 'editprofile' )
--- 681,685 ----
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
! make_jumpbox('viewforum.'.$phpEx);
if ( $mode == 'editprofile' )
***************
*** 712,716 ****
$template->set_filenames(array(
! "body" => "profile_avatar_gallery.tpl")
);
--- 699,703 ----
$template->set_filenames(array(
! 'body' => 'profile_avatar_gallery.tpl')
);
***************
*** 787,791 ****
if ( $mode == 'editprofile' )
{
! $template->assign_block_vars('edit_profile', array());
}
--- 774,778 ----
if ( $mode == 'editprofile' )
{
! $template->assign_block_vars('switch_edit_profile', array());
}
***************
*** 909,913 ****
if ( $userdata['user_allowavatar'] && ( $board_config['allow_avatar_upload'] || $board_config['allow_avatar_local'] || $board_config['allow_avatar_remote'] ) )
{
! $template->assign_block_vars('avatar_block', array() );
if ( $board_config['allow_avatar_upload'] && file_exists('./' . $board_config['avatar_path']) )
--- 896,900 ----
if ( $userdata['user_allowavatar'] && ( $board_config['allow_avatar_upload'] || $board_config['allow_avatar_local'] || $board_config['allow_avatar_remote'] ) )
{
! $template->assign_block_vars('switch_avatar_block', array() );
if ( $board_config['allow_avatar_upload'] && file_exists('./' . $board_config['avatar_path']) )
***************
*** 915,931 ****
if ( $form_enctype != '' )
{
! $template->assign_block_vars('avatar_block.avatar_local_upload', array() );
}
! $template->assign_block_vars('avatar_block.avatar_remote_upload', array() );
}
if ( $board_config['allow_avatar_remote'] )
{
! $template->assign_block_vars('avatar_block.avatar_remote_link', array() );
}
if ( $board_config['allow_avatar_local'] && file_exists('./' . $board_config['avatar_gallery_path']) )
{
! $template->assign_block_vars('avatar_block.avatar_local_gallery', array() );
}
}
--- 902,918 ----
if ( $form_enctype != '' )
{
! $template->assign_block_vars('switch_avatar_block.switch_avatar_local_upload', array() );
}
! $template->assign_block_vars('switch_avatar_block.switch_avatar_remote_upload', array() );
}
if ( $board_config['allow_avatar_remote'] )
{
! $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() );
}
}
***************
*** 936,938 ****
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
! ?>
--- 923,925 ----
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
! ?>
\ No newline at end of file
Index: usercp_sendpasswd.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/usercp_sendpasswd.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** usercp_sendpasswd.php 19 Mar 2002 20:47:59 -0000 1.4
--- usercp_sendpasswd.php 31 Mar 2002 00:06:34 -0000 1.5
***************
*** 24,28 ****
if ( !defined('IN_PHPBB') )
{
! die("Hacking attempt");
exit;
}
--- 24,28 ----
if ( !defined('IN_PHPBB') )
{
! die('Hacking attempt');
exit;
}
***************
*** 30,35 ****
if ( isset($HTTP_POST_VARS['submit']) )
{
! $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']))) : "";
$sql = "SELECT user_id, username, user_email, user_active, user_lang
--- 30,35 ----
if ( isset($HTTP_POST_VARS['submit']) )
{
! $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']))) : '';
$sql = "SELECT user_id, username, user_email, user_active, user_lang
***************
*** 41,45 ****
if ( $row = $db->sql_fetchrow($result) )
{
! if ( $row['user_active'] == 0 )
{
message_die(GENERAL_MESSAGE, $lang['No_send_account_inactive']);
--- 41,45 ----
if ( $row = $db->sql_fetchrow($result) )
{
! if ( !$row['user_active'] )
{
message_die(GENERAL_MESSAGE, $lang['No_send_account_inactive']);
***************
*** 54,60 ****
SET user_newpasswd = '" .md5($user_password) . "', user_actkey = '$user_actkey'
WHERE user_id = " . $row['user_id'];
! if ( !$result = $db->sql_query($sql) )
{
! message_die(GENERAL_ERROR, "Couldn't update new password information", "", __LINE__, __FILE__, $sql);
}
--- 54,60 ----
SET user_newpasswd = '" .md5($user_password) . "', user_actkey = '$user_actkey'
WHERE user_id = " . $row['user_id'];
! if ( !$db->sql_query($sql) )
{
! message_die(GENERAL_ERROR, 'Could not update new password information', '', __LINE__, __FILE__, $sql);
}
***************
*** 62,68 ****
$emailer = new emailer($board_config['smtp_delivery']);
! $email_headers = "From: " . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\r\n";
! $emailer->use_template("user_activate_passwd", $row['user_lang']);
$emailer->email_address($row['user_email']);
$emailer->set_subject();//$lang['New_password_activation']
--- 62,68 ----
$emailer = new emailer($board_config['smtp_delivery']);
! $email_headers = 'From: ' . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\r\n";
! $emailer->use_template('user_activate_passwd', $row['user_lang']);
$emailer->email_address($row['user_email']);
$emailer->set_subject();//$lang['New_password_activation']
***************
*** 70,79 ****
$emailer->assign_vars(array(
! "SITENAME" => $board_config['sitename'],
! "USERNAME" => $username,
! "PASSWORD" => $user_password,
! "EMAIL_SIG" => str_replace("<br />", "\n", "-- \n" . $board_config['board_email_sig']),
! "U_ACTIVATE" => $server_url . "?mode=activate&act_key=$user_actkey")
);
$emailer->send();
--- 70,79 ----
$emailer->assign_vars(array(
! 'SITENAME' => $board_config['sitename'],
! 'USERNAME' => $username,
! 'PASSWORD' => $user_password,
! 'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']),
! 'U_ACTIVATE' => $server_url . "?mode=activate&act_key=$user_actkey")
);
$emailer->send();
***************
*** 81,88 ****
$template->assign_vars(array(
! "META" => '<meta http-equiv="refresh" content="15;url=' . append_sid("index.$phpEx") . '">')
);
! $message = $lang['Password_updated'] . "<br /><br />" . sprintf($lang['Click_return_index'], "<a href=\"" . append_sid("index.$phpEx") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
--- 81,88 ----
$template->assign_vars(array(
! 'META' => '<meta http-equiv="refresh" content="15;url=' . append_sid("index.$phpEx") . '">')
);
! $message = $lang['Password_updated'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>');
message_die(GENERAL_MESSAGE, $message);
***************
*** 95,105 ****
else
{
! message_die(GENERAL_ERROR, "Couldn't obtain user information for sendpassword", "", __LINE__, __FILE__, $sql);
}
}
else
{
! $username = "";
! $email = "";
}
--- 95,105 ----
else
{
! message_die(GENERAL_ERROR, 'Could not obtain user information for sendpassword', '', __LINE__, __FILE__, $sql);
}
}
else
{
! $username = '';
! $email = '';
}
***************
*** 110,141 ****
$template->set_filenames(array(
! "body" => "profile_send_pass.tpl",
! "jumpbox" => "jumpbox.tpl")
);
- $jumpbox = make_jumpbox();
$template->assign_vars(array(
! "L_GO" => $lang['Go'],
! "L_JUMP_TO" => $lang['Jump_to'],
! "L_SELECT_FORUM" => $lang['Select_forum'],
! "S_JUMPBOX_LIST" => $jumpbox,
! "S_JUMPBOX_ACTION" => append_sid("viewforum.$phpEx"))
);
- $template->assign_var_from_handle("JUMPBOX", "jumpbox");
! $template->assign_vars(array(
! "USERNAME" => $username,
! "EMAIL" => $email,
!
! "L_SEND_PASSWORD" => $lang['Send_password'],
! "L_ITEMS_REQUIRED" => $lang['Items_required'],
! "L_EMAIL_ADDRESS" => $lang['Email_address'],
! "L_SUBMIT" => $lang['Submit'],
! "L_RESET" => $lang['Reset'])
! );
!
! $template->pparse("body");
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
! ?>
--- 110,131 ----
$template->set_filenames(array(
! 'body' => 'profile_send_pass.tpl')
);
+ make_jumpbox('viewforum.'.$phpEx);
$template->assign_vars(array(
! 'USERNAME' => $username,
! 'EMAIL' => $email,
! 'L_SEND_PASSWORD' => $lang['Send_password'],
! 'L_ITEMS_REQUIRED' => $lang['Items_required'],
! 'L_EMAIL_ADDRESS' => $lang['Email_address'],
! 'L_SUBMIT' => $lang['Submit'],
! 'L_RESET' => $lang['Reset'])
);
! $template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
!
! ?>
\ No newline at end of file
Index: usercp_viewprofile.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/usercp_viewprofile.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** usercp_viewprofile.php 25 Mar 2002 23:03:32 -0000 1.4
--- usercp_viewprofile.php 31 Mar 2002 00:06:34 -0000 1.5
***************
*** 52,69 ****
//
$template->set_filenames(array(
! 'body' => 'profile_view_body.tpl',
! 'jumpbox' => 'jumpbox.tpl')
);
!
! $jumpbox = make_jumpbox();
! $template->assign_vars(array(
! 'L_GO' => $lang['Go'],
! 'L_JUMP_TO' => $lang['Jump_to'],
! 'L_SELECT_FORUM' => $lang['Select_forum'],
!
! 'S_JUMPBOX_LIST' => $jumpbox,
! 'S_JUMPBOX_ACTION' => append_sid("viewforum.$phpEx"))
! );
! $template->assign_var_from_handle('JUMPBOX', 'jumpbox');
//
--- 52,58 ----
//
$template->set_filenames(array(
! 'body' => 'profile_view_body.tpl')
);
! make_jumpbox('viewforum.'.$phpEx);
//
***************
*** 86,102 ****
}
- if ( !empty($profiledata['user_viewemail']) || $userdata['user_level'] == ADMIN )
- {
- $email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&" . POST_USERS_URL . "=" . $profiledata['user_id']) : 'mailto:' . $profiledata['user_email'];
-
- $email = '<a href="' . $email_uri . '">' . $lang['Send_email'] . '</a>';
- $email_img = '<a href="' . $email_uri . '"><img src="' . $images['icon_email'] . '" alt="' . $lang['Send_email'] . '" border="0" /></a>';
- }
- else
- {
- $email = '';
- $email_img = '';
- }
-
$avatar_img = '';
if ( $profiledata['user_avatar_type'] && $profiledata['user_allowavatar'] )
--- 75,78 ----
***************
*** 141,167 ****
}
! if ( !empty($profiledata['user_icq']) )
{
! $icq_status_img = '<a href="http://wwp.icq.com/' . $profiledata['user_icq'] . '#pager"><img src="http://web.icq.com/whitepages/online?icq=' . $profiledata['user_icq'] . '&img=5" width="18" height="18" border="0" /></a>';
! $icq_add_img = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $profiledata['user_icq'] . '"><img src="' . $images['icon_icq'] . '" alt="' . $lang['ICQ'] . '" border="0" /></a>';
}
else
{
! $icq_status_img = ' ';
! $icq_add_img = ' ';
}
! $aim_img = ( $profiledata['user_aim'] ) ? '<a href="aim:goim?screenname=' . $profiledata['user_aim'] . '&message=Hello+Are+you+there?"><img src="' . $images['icon_aim'] . '" border="0" alt="' . $lang['AIM'] . '" /></a>' : ' ';
! $msnm_img = ( $profiledata['user_msnm'] ) ? '<img src="' . $images['icon_msnm'] . '" border="0" alt="' . $lang['MSNM'] . '" /> ' . $profiledata['user_msnm'] : ' ';
! $yim_img = ( $profiledata['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $profiledata['user_yim'] . '&.src=pg"><img src="' . $images['icon_yim'] . '" border="0" alt="' . $lang['YIM'] . '" /></a>' : ' ';
! $search_img = '<a href="' . append_sid("search.$phpEx?search_author=" . urlencode($profiledata['username']) . "&showresults=posts") . '"><img src="' . $images['icon_search'] . '" border="0" alt="' . $lang['Search_user_posts'] . '" /></a>';
! $search = '<a href="' . append_sid("search.$phpEx?search_author=" . urlencode($profiledata['username']) . "&showresults=posts") . '">' . $lang['Search_user_posts'] . '</a>';
! $www_img = ( $profiledata['user_website'] ) ? '<a href="' . $profiledata['user_website'] . '"><img src="' . $images['icon_www'] . '" alt="' . $lang['Visit_website'] . '" border="0" /></a>' : ' ';
! $pm_img = '<a href="' . append_sid("privmsg.$phpEx?mode=post&" . POST_USERS_URL . "=" . $profiledata['user_id']) . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" border="0" /></a>';
//
--- 117,165 ----
}
! $temp_url = append_sid("privmsg.$phpEx?mode=post&" . POST_USERS_URL . "=" . $profiledata['user_id']);
! $pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message']...
[truncated message content] |