|
From: Paul S. O. <ps...@us...> - 2002-03-31 00:06:38
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv12947
Modified Files:
config.php faq.php groupcp.php index.php login.php
memberlist.php modcp.php posting.php privmsg.php search.php
viewforum.php viewonline.php viewtopic.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: config.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/config.php,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -r1.49 -r1.50
*** config.php 18 Mar 2002 14:52:15 -0000 1.49
--- config.php 31 Mar 2002 00:06:33 -0000 1.50
***************
*** 0 ****
--- 1,51 ----
+ <?php
+
+ //
+ // phpBB 2.x auto-generated config file
+ // Do not change anything in this file!
+ //
+
+ $dbms = "mysql4";
+ $dbhost = "localhost";
+ $dbname = "dev_starstreak_net";
+ $dbuser = "devhttp";
+ $dbpasswd = "efx2KarizonaD";
+
+ $dbhost = "localhost";
+ $dbname = "phpbb_com";
+ $dbuser = "devhttp";
+ $dbpasswd = "efx2KarizonaD";
+
+ /*
+ $dbhost = "localhost";
+ $dbname = "phpbb_test";
+ $dbuser = "devhttp";
+ $dbpasswd = "efx2KarizonaD";
+
+ $dbms = "mssql-odbc";
+
+ $dbhost = "mssql_phpbb_odbc";
+ $dbname = "";
+ $dbuser = "phpbb";
+ $dbpasswd = "efx2000";
+
+ $dbms = "msaccess";
+
+ $dbhost = "phpbb_msaccess_odbc";
+ $dbname = "";
+ $dbuser = "devhttp";
+ $dbpasswd = "efx2KarizonaD";
+
+ $dbms = "mssql";
+
+ $dbhost = "localhost";
+ $dbname = "phpbb";
+ $dbuser = "phpbb";
+ $dbpasswd = "efx2000";
+ */
+
+ $table_prefix = "phpbb_";
+
+ define('PHPBB_INSTALLED', true);
+
+ ?>
\ No newline at end of file
Index: faq.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/faq.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** faq.php 18 Mar 2002 13:35:42 -0000 1.13
--- faq.php 31 Mar 2002 00:06:33 -0000 1.14
***************
*** 22,26 ****
define('IN_PHPBB', true);
! $phpbb_root_path = "./";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
--- 22,26 ----
define('IN_PHPBB', true);
! $phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
***************
*** 38,42 ****
// Load the appropriate faq file
//
-
if( isset($HTTP_GET_VARS['mode']) )
{
--- 38,41 ----
***************
*** 44,52 ****
{
case 'bbcode':
! $lang_file = "lang_bbcode";
$l_title = $lang['BBCode_guide'];
break;
default:
! $lang_file = "lang_faq";
$l_title = $lang['FAQ'];
break;
--- 43,51 ----
{
case 'bbcode':
! $lang_file = 'lang_bbcode';
$l_title = $lang['BBCode_guide'];
break;
default:
! $lang_file = 'lang_faq';
$l_title = $lang['FAQ'];
break;
***************
*** 55,59 ****
else
{
! $lang_file = "lang_faq";
$l_title = $lang['FAQ'];
}
--- 54,58 ----
else
{
! $lang_file = 'lang_faq';
$l_title = $lang['FAQ'];
}
***************
*** 71,75 ****
for($i = 0; $i < count($faq); $i++)
{
! if( $faq[$i][0] != "--" )
{
$faq_block[$j][$counter]['id'] = $counter_2;
--- 70,74 ----
for($i = 0; $i < count($faq); $i++)
{
! if( $faq[$i][0] != '--' )
{
$faq_block[$j][$counter]['id'] = $counter_2;
***************
*** 97,118 ****
$template->set_filenames(array(
! "body" => "faq_body.tpl",
! "jumpbox" => "jumpbox.tpl")
! );
!
! $jumpbox = make_jumpbox($forum_id);
! $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(
! "L_FAQ_TITLE" => $l_title,
! "L_BACK_TO_TOP" => $lang['Back_to_top'])
);
--- 96,106 ----
$template->set_filenames(array(
! 'body' => 'faq_body.tpl')
);
! make_jumpbox('viewforum.'.$phpEx, $forum_id);
$template->assign_vars(array(
! 'L_FAQ_TITLE' => $l_title,
! 'L_BACK_TO_TOP' => $lang['Back_to_top'])
);
***************
*** 121,129 ****
if( count($faq_block[$i]) )
{
! $template->assign_block_vars("faq_block", array(
! "BLOCK_TITLE" => $faq_block_titles[$i])
);
! $template->assign_block_vars("faq_block_link", array(
! "BLOCK_TITLE" => $faq_block_titles[$i])
);
--- 109,117 ----
if( count($faq_block[$i]) )
{
! $template->assign_block_vars('faq_block', array(
! 'BLOCK_TITLE' => $faq_block_titles[$i])
);
! $template->assign_block_vars('faq_block_link', array(
! 'BLOCK_TITLE' => $faq_block_titles[$i])
);
***************
*** 133,151 ****
$row_class = ( !($j % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
! $template->assign_block_vars("faq_block.faq_row", array(
! "ROW_COLOR" => "#" . $row_color,
! "ROW_CLASS" => $row_class,
! "FAQ_QUESTION" => $faq_block[$i][$j]['question'],
! "FAQ_ANSWER" => $faq_block[$i][$j]['answer'],
! "U_FAQ_ID" => $faq_block[$i][$j]['id'])
);
! $template->assign_block_vars("faq_block_link.faq_row_link", array(
! "ROW_COLOR" => "#" . $row_color,
! "ROW_CLASS" => $row_class,
! "FAQ_LINK" => $faq_block[$i][$j]['question'],
! "U_FAQ_LINK" => "#" . $faq_block[$i][$j]['id'])
);
}
--- 121,139 ----
$row_class = ( !($j % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
! $template->assign_block_vars('faq_block.faq_row', array(
! 'ROW_COLOR' => '#' . $row_color,
! 'ROW_CLASS' => $row_class,
! 'FAQ_QUESTION' => $faq_block[$i][$j]['question'],
! 'FAQ_ANSWER' => $faq_block[$i][$j]['answer'],
! 'U_FAQ_ID' => $faq_block[$i][$j]['id'])
);
! $template->assign_block_vars('faq_block_link.faq_row_link', array(
! 'ROW_COLOR' => '#' . $row_color,
! 'ROW_CLASS' => $row_class,
! 'FAQ_LINK' => $faq_block[$i][$j]['question'],
! 'U_FAQ_LINK' => '#' . $faq_block[$i][$j]['id'])
);
}
***************
*** 153,157 ****
}
! $template->pparse("body");
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
--- 141,145 ----
}
! $template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
Index: groupcp.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/groupcp.php,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -r1.56 -r1.57
*** groupcp.php 22 Mar 2002 23:17:03 -0000 1.56
--- groupcp.php 31 Mar 2002 00:06:33 -0000 1.57
***************
*** 26,29 ****
--- 26,112 ----
include($phpbb_root_path . 'common.'.$phpEx);
+ // -------------------------
+ //
+ function generate_user_info(&$row, $date_format, &$from, &$posts, &$joined, &$poster_avatar, &$profile_img, &$profile, &$search_img, &$search, &$pm_img, &$pm, &$email_img, &$email, &$www_img, &$www, &$icq_status_img, &$icq_img, &$icq, &$aim_img, &$aim, &$msn_img, &$msn, &$yim_img, &$yim)
+ {
+ global $lang, $images, $board_config;
+
+ $from = ( !empty($row['user_from']) ) ? $row['user_from'] : ' ';
[...1722 lines suppressed...]
if ( $s_pending_groups_opt != '' )
{
! $template->assign_block_vars('switch_groups_joined.switch_groups_pending', array() );
}
if ( $s_group_list_opt != '' )
{
! $template->assign_block_vars('switch_groups_remaining', array() );
}
***************
*** 1326,1332 ****
}
- //
- // Page footer
- //
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
--- 1266,1269 ----
Index: index.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/index.php,v
retrieving revision 1.97
retrieving revision 1.98
diff -C2 -r1.97 -r1.98
*** index.php 19 Mar 2002 12:38:12 -0000 1.97
--- index.php 31 Mar 2002 00:06:33 -0000 1.98
***************
*** 268,271 ****
--- 268,282 ----
'FORUM_LOCKED_IMG' => $images['forum_locked'],
+ 'L_FORUM' => $lang['Forum'],
+ 'L_TOPICS' => $lang['Topics'],
+ 'L_REPLIES' => $lang['Replies'],
+ 'L_VIEWS' => $lang['Views'],
+ 'L_POSTS' => $lang['Posts'],
+ 'L_LASTPOST' => $lang['Last_Post'],
+ 'L_NO_NEW_POSTS' => $lang['No_new_posts'],
+ 'L_NEW_POSTS' => $lang['New_posts'],
+ 'L_NO_NEW_POSTS_LOCKED' => $lang['No_new_posts_locked'],
+ 'L_NEW_POSTS_LOCKED' => $lang['New_posts_locked'],
+
'L_MODERATOR' => $lang['Moderators'],
'L_FORUM_LOCKED' => $lang['Forum_is_locked'],
***************
*** 300,307 ****
if ( $display_forums )
{
! $template->assign_block_vars("catrow", array(
! "CAT_ID" => $cat_id,
! "CAT_DESC" => $category_rows[$i]['cat_title'],
! "U_VIEWCAT" => append_sid("index.$phpEx?" . POST_CAT_URL . "=$cat_id"))
);
--- 311,318 ----
if ( $display_forums )
{
! $template->assign_block_vars('catrow', array(
! 'CAT_ID' => $cat_id,
! 'CAT_DESC' => $category_rows[$i]['cat_title'],
! 'U_VIEWCAT' => append_sid("index.$phpEx?" . POST_CAT_URL . "=$cat_id"))
);
***************
*** 318,322 ****
if ( $forum_data[$j]['forum_status'] == FORUM_LOCKED )
{
! $folder_image = '<img src="' . $images['forum_locked'] . '" alt="' . $lang['Forum_locked'] . '" />';
}
else
--- 329,334 ----
if ( $forum_data[$j]['forum_status'] == FORUM_LOCKED )
{
! $folder_image = $images['forum_locked'];
! $folder_alt = $lang['Forum_locked'];
}
else
***************
*** 366,370 ****
}
! $folder_image = ( $unread_topics ) ? '<img src="' . $images['forum_new'] . '" alt="' . $lang['New_posts'] . '" title="' . $lang['New_posts'] . '" />' : '<img src="' . $images['forum'] . '" alt="' . $lang['No_new_posts'] . '" title="' . $lang['No_new_posts'] . '" />';
}
--- 378,383 ----
}
! $folder_image = ( $unread_topics ) ? $images['forum_new'] : $images['forum'];
! $folder_alt = ( $unread_topics ) ? $lang['New_posts'] : $lang['No_new_posts'];
}
***************
*** 378,384 ****
$last_post = $last_post_time . '<br />';
! $last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != "" ) ? $forum_data[$j]['post_username'] . " " : $lang['Guest'] . " " ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> ';
! $last_post .= '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';
}
else
--- 391,397 ----
$last_post = $last_post_time . '<br />';
! $last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> ';
! $last_post .= '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';
}
else
***************
*** 401,418 ****
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
! $template->assign_block_vars("catrow.forumrow", array(
! "ROW_COLOR" => '#' . $row_color,
! "ROW_CLASS" => $row_class,
! "FOLDER" => $folder_image,
! "FORUM_NAME" => $forum_data[$j]['forum_name'],
! "FORUM_DESC" => $forum_data[$j]['forum_desc'],
! "POSTS" => $forum_data[$j]['forum_posts'],
! "TOPICS" => $forum_data[$j]['forum_topics'],
! "LAST_POST" => $last_post,
! "MODERATORS" => $moderator_list,
! "L_MODERATOR" => $l_moderators,
! "U_VIEWFORUM" => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"))
);
}
--- 414,432 ----
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
! $template->assign_block_vars('catrow.forumrow', array(
! 'ROW_COLOR' => '#' . $row_color,
! 'ROW_CLASS' => $row_class,
! 'FORUM_FOLDER_IMG' => $folder_image,
! 'FORUM_NAME' => $forum_data[$j]['forum_name'],
! 'FORUM_DESC' => $forum_data[$j]['forum_desc'],
! 'POSTS' => $forum_data[$j]['forum_posts'],
! 'TOPICS' => $forum_data[$j]['forum_topics'],
! 'LAST_POST' => $last_post,
! 'MODERATORS' => $moderator_list,
! 'L_MODERATOR' => $l_moderators,
! 'L_FORUM_FOLDER_ALT' => $folder_alt,
! 'U_VIEWFORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"))
);
}
Index: login.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/login.php,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -r1.46 -r1.47
*** login.php 28 Mar 2002 19:52:21 -0000 1.46
--- login.php 31 Mar 2002 00:06:33 -0000 1.47
***************
*** 28,32 ****
define('IN_PHPBB', true);
! $phpbb_root_path = "./";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
--- 28,32 ----
define('IN_PHPBB', true);
! $phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
***************
*** 41,44 ****
--- 41,46 ----
//
+ $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']) )
{
***************
*** 48,57 ****
// normal Location redirector is used in preference
//
- $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']) ) && !$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
--- 50,57 ----
// 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
***************
*** 60,64 ****
if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, "Error in obtaining userdata : login", "", __LINE__, __FILE__, $sql);
}
--- 60,64 ----
if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, 'Error in obtaining userdata', '', __LINE__, __FILE__, $sql);
}
***************
*** 95,102 ****
else
{
! $redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? $HTTP_POST_VARS['redirect'] : "";
$template->assign_vars(array(
! "META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("login.$phpEx?redirect=$redirect") . '">')
);
--- 95,102 ----
else
{
! $redirect = ( !empty($HTTP_POST_VARS['redirect']) ) ? $HTTP_POST_VARS['redirect'] : '';
$template->assign_vars(array(
! 'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("login.$phpEx?redirect=$redirect") . '">')
);
***************
*** 112,116 ****
$template->assign_vars(array(
! "META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("login.$phpEx?redirect=$redirect") . '">')
);
--- 112,116 ----
$template->assign_vars(array(
! 'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("login.$phpEx?redirect=$redirect") . '">')
);
***************
*** 160,164 ****
$template->set_filenames(array(
! "body" => "login_body.tpl")
);
--- 160,164 ----
$template->set_filenames(array(
! 'body' => 'login_body.tpl')
);
***************
*** 171,179 ****
$forward_to = ( !empty($forward_matches[3]) ) ? $forward_matches[3] : $forward_matches[1];
! $forward_match = explode("&", $forward_to);
if(count($forward_match) > 1)
{
! $forward_page = "";
for($i = 1; $i < count($forward_match); $i++)
--- 171,179 ----
$forward_to = ( !empty($forward_matches[3]) ) ? $forward_matches[3] : $forward_matches[1];
! $forward_match = explode('&', $forward_to);
if(count($forward_match) > 1)
{
! $forward_page = '';
for($i = 1; $i < count($forward_match); $i++)
***************
*** 181,187 ****
if( !ereg("sid=", $forward_match[$i]) )
{
! if( $forward_page != "" )
{
! $forward_page .= "&";
}
$forward_page .= $forward_match[$i];
--- 181,187 ----
if( !ereg("sid=", $forward_match[$i]) )
{
! if( $forward_page != '' )
{
! $forward_page .= '&';
}
$forward_page .= $forward_match[$i];
***************
*** 189,193 ****
}
! $forward_page = $forward_match[0] . "?" . $forward_page;
}
else
--- 189,193 ----
}
! $forward_page = $forward_match[0] . '?' . $forward_page;
}
else
***************
*** 199,221 ****
else
{
! $forward_page = "";
}
! $username = ( $userdata['user_id'] != ANONYMOUS ) ? $userdata['username'] : "";
$s_hidden_fields = '<input type="hidden" name="redirect" value="' . $forward_page . '" />';
$template->assign_vars(array(
! "USERNAME" => $username,
! "L_ENTER_PASSWORD" => $lang['Enter_password'],
! "L_SEND_PASSWORD" => $lang['Forgotten_password'],
! "U_SEND_PASSWORD" => append_sid("profile.$phpEx?mode=sendpassword"),
! "S_HIDDEN_FIELDS" => $s_hidden_fields)
);
! $template->pparse("body");
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
--- 199,222 ----
else
{
! $forward_page = '';
}
! $username = ( $userdata['user_id'] != ANONYMOUS ) ? $userdata['username'] : '';
$s_hidden_fields = '<input type="hidden" name="redirect" value="' . $forward_page . '" />';
+ make_jumpbox('viewforum.'.$phpEx, $forum_id);
$template->assign_vars(array(
! 'USERNAME' => $username,
! 'L_ENTER_PASSWORD' => $lang['Enter_password'],
! 'L_SEND_PASSWORD' => $lang['Forgotten_password'],
! 'U_SEND_PASSWORD' => append_sid("profile.$phpEx?mode=sendpassword"),
! 'S_HIDDEN_FIELDS' => $s_hidden_fields)
);
! $template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
***************
*** 223,230 ****
else
{
! header("Location: " . append_sid("index.$phpEx", true));
}
}
! ?>
--- 224,231 ----
else
{
! header($header_location . append_sid("index.$phpEx", true));
}
}
! ?>
\ No newline at end of file
Index: memberlist.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/memberlist.php,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -r1.35 -r1.36
*** memberlist.php 18 Mar 2002 13:35:42 -0000 1.35
--- memberlist.php 31 Mar 2002 00:06:33 -0000 1.36
***************
*** 21,25 ****
define('IN_PHPBB', true);
! $phpbb_root_path = "./";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
--- 21,25 ----
define('IN_PHPBB', true);
! $phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
***************
*** 38,57 ****
if(isset($HTTP_POST_VARS['order']))
{
! $sort_order = ($HTTP_POST_VARS['order'] == "ASC") ? "ASC" : "DESC";
}
else if(isset($HTTP_GET_VARS['order']))
{
! $sort_order = ($HTTP_GET_VARS['order'] == "ASC") ? "ASC" : "DESC";
}
else
{
! $sort_order = "ASC";
}
! 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 'joined':
--- 38,113 ----
if(isset($HTTP_POST_VARS['order']))
{
! $sort_order = ($HTTP_POST_VARS['order'] == 'ASC') ? 'ASC' : 'DESC';
}
else if(isset($HTTP_GET_VARS['order']))
{
! $sort_order = ($HTTP_GET_VARS['order'] == 'ASC') ? 'ASC' : 'DESC';
}
else
{
! $sort_order = 'ASC';
}
! //
! // Memberlist sorting
! //
! $mode_types_text = array($lang['Sort_Joined'], $lang['Sort_Username'], $lang['Sort_Location'], $lang['Sort_Posts'], $lang['Sort_Email'], $lang['Sort_Website'], $lang['Sort_Top_Ten']);
! $mode_types = array('joindate', 'username', 'location', 'posts', 'email', 'website', 'topten');
!
! $select_sort_mode = '<select name="mode">';
! for($i = 0; $i < count($mode_types_text); $i++)
! {
! $selected = ( $mode == $mode_types[$i] ) ? ' selected="selected"' : '';
! $select_sort_mode .= "<option value=\"" . $mode_types[$i] . "\"$selected>" . $mode_types_text[$i] . "</option>";
! }
! $select_sort_mode .= '</select>';
!
! $select_sort_order = '<select name="order">';
! if($sort_order == 'ASC')
! {
! $select_sort_order .= '<option value="ASC" selected="selected">' . $lang['Sort_Ascending'] . '</option><option value="DESC">' . $lang['Sort_Descending'] . '</option>';
! }
! else
! {
! $select_sort_order .= '<option value="ASC">' . $lang['Sort_Ascending'] . '</option><option value="DESC" selected="selected">' . $lang['Sort_Descending'] . '</option>';
! }
! $select_sort_order .= '</select>';
!
! //
! // Generate page
! //
! $page_title = $lang['Memberlist'];
! include($phpbb_root_path . 'includes/page_header.'.$phpEx);
!
! $template->set_filenames(array(
! 'body' => 'memberlist_body.tpl')
! );
! make_jumpbox('viewforum.'.$phpEx);
!
! $template->assign_vars(array(
! 'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'],
! 'L_EMAIL' => $lang['Email'],
! 'L_WEBSITE' => $lang['Website'],
! 'L_FROM' => $lang['Location'],
! 'L_ORDER' => $lang['Order'],
! 'L_SORT' => $lang['Sort'],
! 'L_SUBMIT' => $lang['Sort'],
! 'L_AIM' => $lang['AIM'],
! 'L_YIM' => $lang['YIM'],
! 'L_MSNM' => $lang['MSNM'],
! 'L_ICQ' => $lang['ICQ'],
! 'L_JOINED' => $lang['Joined'],
! 'L_POSTS' => $lang['Posts'],
!
! '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 'joined':
***************
*** 85,88 ****
--- 141,145 ----
$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
FROM " . USERS_TABLE . "
***************
*** 91,265 ****
if( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, "Couldn't query users", "", __LINE__, __FILE__, $sql);
}
- $members = $db->sql_fetchrowset($result);
-
- $db->sql_freeresult($result);
-
- //
- // Memberlist sorting
- //
- $mode_types_text = array($lang['Sort_Joined'], $lang['Sort_Username'], $lang['Sort_Location'], $lang['Sort_Posts'], $lang['Sort_Email'], $lang['Sort_Website'], $lang['Sort_Top_Ten']);
- $mode_types = array("joindate", "username", "location", "posts", "email", "website", "topten");
! $select_sort_mode = "<select name=\"mode\">";
! for($i = 0; $i < count($mode_types_text); $i++)
! {
! $selected = ($mode == $mode_types[$i]) ? " selected=\"selected\"" : "";
! $select_sort_mode .= "<option value=\"" . $mode_types[$i] . "\"$selected>" . $mode_types_text[$i] . "</option>";
! }
! $select_sort_mode .= "</select>";
!
! $select_sort_order = "<select name=\"order\">";
! if($sort_order == "ASC")
{
! $select_sort_order .= "<option value=\"ASC\" selected=\"selected\">" . $lang['Sort_Ascending'] . "</option><option value=\"DESC\">" . $lang['Sort_Descending'] . "</option>";
! }
! else
! {
! $select_sort_order .= "<option value=\"ASC\">" . $lang['Sort_Ascending'] . "</option><option value=\"DESC\" selected=\"selected\">" . $lang['Sort_Descending'] . "</option>";
! }
! $select_sort_order .= "</select>";
!
! //
! // Generate page
! //
! $page_title = $lang['Memberlist'];
! include($phpbb_root_path . 'includes/page_header.'.$phpEx);
!
! $template->set_filenames(array(
! "body" => "memberlist_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");
!
! $template->assign_vars(array(
! "L_SELECT_SORT_METHOD" => $lang['Select_sort_method'],
! "L_EMAIL" => $lang['Email'],
! "L_WEBSITE" => $lang['Website'],
! "L_FROM" => $lang['Location'],
! "L_ORDER" => $lang['Order'],
! "L_SORT" => $lang['Sort'],
! "L_SUBMIT" => $lang['Sort'],
! "L_AIM" => $lang['AIM'],
! "L_YIM" => $lang['YIM'],
! "L_MSNM" => $lang['MSNM'],
! "L_ICQ" => $lang['ICQ'],
!
! "S_MODE_SELECT" => $select_sort_mode,
! "S_ORDER_SELECT" => $select_sort_order,
! "S_MODE_ACTION" => append_sid("memberlist.$phpEx"))
! );
!
! for($i = 0; $i < count($members); $i++)
! {
! $username = $members[$i]['username'];
! $user_id = $members[$i]['user_id'];
! $from = ( !empty($members[$i]['user_from']) ) ? $members[$i]['user_from'] : " ";
! $joined = create_date($lang['DATE_FORMAT'], $members[$i]['user_regdate'], $board_config['board_timezone']);
! $posts = ( $members[$i]['user_posts'] ) ? $members[$i]['user_posts'] : 0;
! if( $members[$i]['user_avatar_type'] && $user_id != ANONYMOUS && $members[$i]['user_allowavatar'] )
! {
! switch( $postrow[$i]['user_avatar_type'] )
{
! case USER_AVATAR_UPLOAD:
! $poster_avatar = "<img src=\"" . $board_config['avatar_path'] . "/" . $members[$i]['user_avatar'] . "\" alt=\"\" border=\"0\" />";
! break;
! case USER_AVATAR_REMOTE:
! $poster_avatar = "<img src=\"" . $members[$i]['user_avatar'] . "\" alt=\"\" border=\"0\" />";
! break;
! case USER_AVATAR_GALLERY:
! $poster_avatar = "<img src=\"" . $board_config['avatar_gallery_path'] . "/" . $members[$i]['user_avatar'] . "\" alt=\"\" border=\"0\" />";
! break;
}
- }
- else
- {
- $poster_avatar = "";
- }
! if( !empty($members[$i]['user_viewemail']) || $userdata['user_level'] == ADMIN )
! {
! $email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&" . POST_USERS_URL ."=" . $members[$i]['user_id']) : "mailto:" . $members[$i]['user_email'];
! $email_img = "<a href=\"$email_uri\"><img src=\"" . $images['icon_email'] . "\" border=\"0\" alt=\"" . $lang['Send_email'] . "\" /></a>";
! }
! else
! {
! $email_img = " ";
! }
! $pm_img = "<a href=\"" . append_sid("privmsg.$phpEx?mode=post&" . POST_USERS_URL . "=" . $members[$i]['user_id']) . "\"><img src=\"" . $images['icon_pm'] . "\" border=\"0\" alt=\"" . $lang['Send_private_message'] . "\" /></a>";
! if( $members[$i]['user_website'] != "" )
! {
! $www_img = "<a href=\"" . $members[$i]['user_website'] . "\" target=\"_userwww\"><img src=\"" . $images['icon_www'] . "\" border=\"0\" alt=\"" . $lang['Visit_website'] . "\" /></a>";
! }
! else
! {
! $www_img = " ";
! }
! if( $members[$i]['user_icq'] )
! {
! $icq_status_img = "<a href=\"http://wwp.icq.com/" . $members[$i]['user_icq'] . "#pager\"><img src=\"http://online.mirabilis.com/scripts/online.dll?icq=" . $members[$i]['user_icq'] . "&img=5\" border=\"0\" alt=\"\" /></a>";
! $icq_add_img = "<a href=\"http://wwp.icq.com/scripts/search.dll?to=" . $members[$i]['user_icq'] . "\"><img src=\"" . $images['icq'] . "\" alt=\"" . $lang['ICQ'] . "\" border=\"0\" /></a>";
! }
! else
! {
! $icq_status_img = " ";
! $icq_add_img = " ";
}
!
! $aim_img = ( $members[$i]['user_aim'] ) ? "<a href=\"aim:goim?screenname=" . $members[$i]['user_aim'] . "&message=Hello+Are+you+there?\"><img src=\"" . $images['icon_aim'] . "\" border=\"0\" alt=\"" . $lang['AIM'] . "\" /></a>" : " ";
!
! $msn_img = ( $members[$i]['user_msnm'] ) ? "<a href=\"profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$poster_id\"><img src=\"" . $images['icon_msnm'] . "\" border=\"0\" alt=\"" . $lang['MSNM'] . "\" /></a>" : " ";
!
! $yim_img = ( $members[$i]['user_yim'] ) ? "<a href=\"http://edit.yahoo.com/config/send_webmesg?.target=" . $members[$i]['user_yim'] . "&.src=pg\"><img src=\"" . $images['icon_yim'] . "\" border=\"0\" alt=\"" . $lang['YIM'] . "\" /></a>" : " ";
!
! $search_img = "<a href=\"" . append_sid("search.$phpEx?a=" . urlencode($members[$i]['username']) . "&f=all&b=0&d=DESC&c=100&dosearch=1") . "\"><img src=\"" . $images['icon_search'] . "\" border=\"0\" alt=\"" . $lang['Search'] . "\" /></a>";
!
! $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
! $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
!
! $template->assign_block_vars("memberrow", array(
! "U_VIEWPROFILE" => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $user_id),
!
! "ROW_NUMBER" => $i + ( $HTTP_GET_VARS['start'] + 1 ),
! "ROW_COLOR" => "#" . $row_color,
! "ROW_CLASS" => $row_class,
! "USERNAME" => $username,
! "FROM" => $from,
! "JOINED" => $joined,
! "POSTS" => $posts,
!
! "AVATAR_IMG" => $poster_avatar,
! "EMAIL_IMG" => $email_img,
! "PM_IMG" => $pm_img,
! "WWW_IMG" => $www_img,
! "ICQ_STATUS_IMG" => $icq_status_img,
! "ICQ_ADD_IMG" => $icq_add_img,
! "AIM_IMG" => $aim_img,
! "YIM_IMG" => $yim_img,
! "MSN_IMG" => $msn_img,
! "SEARCH_IMG" => $search)
! );
}
! if($mode != "topten" || $board_config['topics_per_page'] < 10)
{
$sql = "SELECT count(*) AS total
--- 148,275 ----
if( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, 'Could not query users', '', __LINE__, __FILE__, $sql);
}
! if ( $row = $db->sql_fetchrow($result) )
{
! $i = 0;
! do
! {
! $username = $row['username'];
! $user_id = $row['user_id'];
! $from = ( !empty($row['user_from']) ) ? $row['user_from'] : ' ';
! $joined = create_date($lang['DATE_FORMAT'], $row['user_regdate'], $board_config['board_timezone']);
! $posts = ( $row['user_posts'] ) ? $row['user_posts'] : 0;
! $poster_avatar = '';
! if ( $row['user_avatar_type'] && $user_id != ANONYMOUS && $row['user_allowavatar'] )
! {
! switch( $row['user_avatar_type'] )
! {
! case USER_AVATAR_UPLOAD:
! $poster_avatar = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $row['user_avatar'] . '" alt="" border="0" />' : '';
! break;
! case USER_AVATAR_REMOTE:
! $poster_avatar = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $row['user_avatar'] . '" alt="" border="0" />' : '';
! break;
! case USER_AVATAR_GALLERY:
! $poster_avatar = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $row['user_avatar'] . '" alt="" border="0" />' : '';
! break;
! }
! }
! if ( !empty($row['user_viewemail']) || $userdata['user_level'] == ADMIN )
! {
! $email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&" . POST_USERS_URL .'=' . $user_id) : 'mailto:' . $row['user_email'];
! $email_img = '<a href="' . $email_uri . '"><img src="' . $images['icon_email'] . '" alt="' . $lang['Send_email'] . '" title="' . $lang['Send_email'] . '" border="0" /></a>';
! $email = '<a href="' . $email_uri . '">' . $lang['Send_email'] . '</a>';
! }
! else
{
! $email_img = ' ';
! $email = ' ';
}
! $temp_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id");
! $profile_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_profile'] . '" alt="' . $lang['Read_profile'] . '" title="' . $lang['Read_profile'] . '" border="0" /></a>';
! $profile = '<a href="' . $temp_url . '">' . $lang['Read_profile'] . '</a>';
!
! $temp_url = append_sid("privmsg.$phpEx?mode=post&" . POST_USERS_URL . "=$user_id");
! $pm_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_pm'] . '" alt="' . $lang['Send_private_message'] . '" title="' . $lang['Send_private_message'] . '" border="0" /></a>';
! $pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';
! $www_img = ( $row['user_website'] ) ? '<a href="' . $row['user_website'] . '" target="_userwww"><img src="' . $images['icon_www'] . '" alt="' . $lang['Visit_website'] . '" title="' . $lang['Visit_website'] . '" border="0" /></a>' : '';
! $www = ( $row['user_website'] ) ? '<a href="' . $row['user_website'] . '" target="_userwww">' . $lang['Visit_website'] . '</a>' : '';
! if ( !empty($row['user_icq']) )
! {
! $icq_status_img = '<a href="http://wwp.icq.com/' . $row['user_icq'] . '#pager"><img src="http://web.icq.com/whitepages/online?icq=' . $row['user_icq'] . '&img=5" width="18" height="18" border="0" /></a>';
! $icq_img = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '"><img src="' . $images['icon_icq'] . '" alt="' . $lang['ICQ'] . '" title="' . $lang['ICQ'] . '" border="0" /></a>';
! $icq = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '">' . $lang['ICQ'] . '</a>';
! }
! else
! {
! $icq_status_img = '';
! $icq_img = '';
! $icq = '';
! }
! $aim_img = ( $row['user_aim'] ) ? '<a href="aim:goim?screenname=' . $row['user_aim'] . '&message=Hello+Are+you+there?"><img src="' . $images['icon_aim'] . '" alt="' . $lang['AIM'] . '" title="' . $lang['AIM'] . '" border="0" /></a>' : '';
! $aim = ( $row['user_aim'] ) ? '<a href="aim:goim?screenname=' . $row['user_aim'] . '&message=Hello+Are+you+there?">' . $lang['AIM'] . '</a>' : '';
! $temp_url = append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id");
! $msn_img = ( $row['user_msnm'] ) ? '<a href="' . $temp_url . '"><img src="' . $images['icon_msnm'] . '" alt="' . $lang['MSNM'] . '" title="' . $lang['MSNM'] . '" border="0" /></a>' : '';
! $msn = ( $row['user_msnm'] ) ? '<a href="' . $temp_url . '">' . $lang['MSNM'] . '</a>' : '';
!
! $yim_img = ( $row['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg"><img src="' . $images['icon_yim'] . '" alt="' . $lang['YIM'] . '" title="' . $lang['YIM'] . '" border="0" /></a>' : '';
! $yim = ( $row['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg">' . $lang['YIM'] . '</a>' : '';
!
! $temp_url = append_sid("search.$phpEx?search_author=" . urlencode($username) . "&showresults=posts");
! $search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . $lang['Search_user_posts'] . '" border="0" /></a>';
! $search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';
!
! $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
! $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
!
! $template->assign_block_vars('memberrow', array(
! 'ROW_NUMBER' => $i + ( $HTTP_GET_VARS['start'] + 1 ),
! 'ROW_COLOR' => '#' . $row_color,
! 'ROW_CLASS' => $row_class,
! 'USERNAME' => $username,
! 'FROM' => $from,
! 'JOINED' => $joined,
! 'POSTS' => $posts,
! 'AVATAR_IMG' => $poster_avatar,
! 'PROFILE_IMG' => $profile_img,
! 'PROFILE' => $profile,
! 'SEARCH_IMG' => $search_img,
! 'SEARCH' => $search,
! 'PM_IMG' => $pm_img,
! 'PM' => $pm,
! 'EMAIL_IMG' => $email_img,
! 'EMAIL' => $email,
! 'WWW_IMG' => $www_img,
! 'WWW' => $www,
! 'ICQ_STATUS_IMG' => $icq_status_img,
! 'ICQ_IMG' => $icq_img,
! 'ICQ' => $icq,
! 'AIM_IMG' => $aim_img,
! 'AIM' => $aim,
! 'MSN_IMG' => $msn_img,
! 'MSN' => $msn,
! 'YIM_IMG' => $yim_img,
! 'YIM' => $yim,
!
! 'U_VIEWPROFILE' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$user_id"))
! );
! $i++;
}
! while ( $row = $db->sql_fetchrow($result) );
}
! if ( $mode != 'topten' || $board_config['topics_per_page'] < 10 )
{
$sql = "SELECT count(*) AS total
***************
*** 267,297 ****
WHERE user_id <> " . ANONYMOUS;
! if(!$count_result = $db->sql_query($sql))
{
! message_die(GENERAL_ERROR, "Error getting total users.", "", __LINE__, __FILE__, $sql);
}
! else
{
- $total = $db->sql_fetchrow($count_result);
$total_members = $total['total'];
! $pagination = generate_pagination("memberlist.$phpEx?mode=$mode&order=$sort_order", $total_members, $board_config['topics_per_page'], $start)." ";
}
}
else
{
! $pagination = " ";
$total_members = 10;
}
$template->assign_vars(array(
! "PAGINATION" => $pagination,
! "PAGE_NUMBER" => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $total_members / $board_config['topics_per_page'] )),
! "L_GOTO_PAGE" => $lang['Goto_page'])
);
! $template->pparse("body");
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
! ?>
--- 277,308 ----
WHERE user_id <> " . ANONYMOUS;
! if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, 'Error getting total users', '', __LINE__, __FILE__, $sql);
}
!
! if ( $total = $db->sql_fetchrow($result) )
{
$total_members = $total['total'];
! $pagination = generate_pagination("memberlist.$phpEx?mode=$mode&order=$sort_order", $total_members, $board_config['topics_per_page'], $start). ' ';
}
}
else
{
! $pagination = ' ';
$total_members = 10;
}
$template->assign_vars(array(
! 'PAGINATION' => $pagination,
! 'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $total_members / $board_config['topics_per_page'] )),
! 'L_GOTO_PAGE' => $lang['Goto_page'])
);
!
! $template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
! ?>
\ No newline at end of file
Index: modcp.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/modcp.php,v
retrieving revision 1.68
retrieving revision 1.69
diff -C2 -r1.68 -r1.69
*** modcp.php 26 Mar 2002 16:27:20 -0000 1.68
--- modcp.php 31 Mar 2002 00:06:33 -0000 1.69
***************
*** 87,91 ****
$redirect = "index.$phpEx";
}
! header("Location: " . append_sid($redirect, true));
}
--- 87,93 ----
$redirect = "index.$phpEx";
}
!
! $header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
! header($header_location . append_sid($redirect, true));
}
***************
*** 180,184 ****
$is_auth = auth(AUTH_ALL, $forum_id, $userdata);
! if( !$is_auth['auth_mod'] )
{
message_die(GENERAL_MESSAGE, $lang['Not_Moderator'], $lang['Not_Authorised']);
--- 182,186 ----
$is_auth = auth(AUTH_ALL, $forum_id, $userdata);
! if ( !$is_auth['auth_mod'] )
{
message_die(GENERAL_MESSAGE, $lang['Not_Moderator'], $lang['Not_Authorised']);
***************
*** 404,415 ****
}
! $sql_select = "SELECT *
FROM " . TOPICS_TABLE . "
WHERE topic_id IN ($topic_list)
AND topic_moved_id = 0";
!
! if ( !($result = $db->sql_query($sql_select, BEGIN_TRANSACTION)) )
{
! message_die(GENERAL_ERROR, 'Could not select from topic table', '', __LINE__, __FILE__, $sql_select);
}
--- 406,416 ----
}
! $sql = "SELECT *
FROM " . TOPICS_TABLE . "
WHERE topic_id IN ($topic_list)
AND topic_moved_id = 0";
! if ( !($result = $db->sql_query($sql, BEGIN_TRANSACTION)) )
{
! message_die(GENERAL_ERROR, 'Could not select from topic table', '', __LINE__, __FILE__, $sql);
}
***************
*** 519,530 ****
'L_NO' => $lang['No'],
! 'S_FORUM_BOX' => make_forum_select('new_forum', $forum_id),
'S_MODCP_ACTION' => append_sid("modcp.$phpEx"),
'S_HIDDEN_FIELDS' => $hidden_fields)
);
- $template->pparse("movetopic");
! include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
}
break;
--- 520,531 ----
'L_NO' => $lang['No'],
! 'S_FORUM_SELECT' => make_forum_select('new_forum', $forum_id),
'S_MODCP_ACTION' => append_sid("modcp.$phpEx"),
'S_HIDDEN_FIELDS' => $hidden_fields)
);
! $template->pparse('movetopic');
+ include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
}
break;
***************
*** 725,728 ****
--- 726,730 ----
'L_MARK_ALL' => $lang['Mark_all'],
'L_UNMARK_ALL' => $lang['Unmark_all'],
+ 'L_POST' => $lang['Post'],
'FORUM_NAME' => $forum_name,
***************
*** 798,803 ****
'POST_SUBJECT' => $post_subject,
'MESSAGE' => $message,
! 'SPLIT_CHECKBOX' => $checkbox,
! 'POST_ID' => $post_id)
);
}
--- 800,806 ----
'POST_SUBJECT' => $post_subject,
'MESSAGE' => $message,
! 'POST_ID' => $post_id,
!
! 'S_SPLIT_CHECKBOX' => $checkbox)
);
}
***************
*** 873,903 ****
}
! $poster_ips = $db->sql_fetchrowset($result);
!
! $j = 0;
! for($i = 0; $i < count($poster_ips); $i++)
{
! if ( $poster_ips[$i]['poster_ip'] == $post_row['poster_ip'] )
{
! $template->assign_vars(array(
! 'POSTINGS' => $poster_ips[$i]['postings'] . ' ' .$lang['Posts'])
! );
! continue;
! }
! $ip = decode_ip($poster_ips[$i]['poster_ip']);
! $ip = ( $rdns_ip_num == $poster_ips[$i]['poster_ip'] || $rdns_ip_num == 'all') ? gethostbyaddr($ip) : $ip;
! $j++; // Can't use $i because of the 'continue'
! $row_color = ( !($j % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
! $row_class = ( !($j % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
!
! $template->assign_block_vars('iprow', array(
! 'ROW_COLOR' => '#' . $row_color,
! 'ROW_CLASS' => $row_class,
! 'IP' => $ip,
! 'POSTINGS' => $poster_ips[$i]['postings'] . ' ' .$lang['Posts'],
! 'U_LOOKUP_IP' => append_sid("modcp.$phpEx?mode=ip&" . POST_POST_URL . "=$post_id&" . POST_TOPIC_URL . "=$topic_id&rdns=" . $poster_ips[$i]['poster_ip']))
! );
}
--- 876,910 ----
}
! if ( $row = $db->sql_fetchrow($result) )
{
! $i = 0;
! do
{
! if ( $row['poster_ip'] == $post_row['poster_ip'] )
! {
! $template->assign_vars(array(
! 'POSTS' => $row['postings'] . ' ' . ( ( $row['postings'] == 1 ) ? $lang['Post'] : $lang['Posts'] ))
! );
! continue;
! }
! $ip = decode_ip($row['poster_ip']);
! $ip = ( $rdns_ip_num == $row['poster_ip'] || $rdns_ip_num == 'all') ? gethostbyaddr($ip) : $ip;
! $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
! $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
!
! $template->assign_block_vars('iprow', array(
! 'ROW_COLOR' => '#' . $row_color,
! 'ROW_CLASS' => $row_class,
! '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++;
! }
! while ( $row = $db->sql_fetchrow($result) );
}
***************
*** 905,909 ****
// Get other users who've posted under this IP
//
! $sql = "SELECT u.user_id, u.username, count(*) as postings
FROM " . USERS_TABLE ." u, " . POSTS_TABLE . " p
WHERE p.poster_id = u.user_id
--- 912,916 ----
// Get other users who've posted under this IP
//
! $sql = "SELECT u.user_id, u.username, COUNT(*) as postings
FROM " . USERS_TABLE ." u, " . POSTS_TABLE . " p
WHERE p.poster_id = u.user_id
***************
*** 916,942 ****
}
! $poster_ids = $db->sql_fetchrowset($result);
!
! for($i = 0; $i < count($poster_ids); $i++)
{
! $id = $poster_ids[$i]['user_id'];
! $username = ( $is == ANONYMOUS ) ? $lang['Guest'] : $poster_ids[$i]['username'];
! $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
! $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
! $template->assign_block_vars('userrow', array(
! 'ROW_COLOR' => '#' . $row_color,
! 'ROW_CLASS' => $row_class,
! 'USERNAME' => $username,
! 'POSTINGS' => $poster_ids[$i]['postings'] . ' ' .$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"))
! );
}
! $template->pparse("viewip");
break;
--- 923,954 ----
}
! if ( $row = $db->sql_fetchrow($result) )
{
! $i = 0;
! do
! {
! $id = $row['user_id'];
! $username = ( $id == ANONYMOUS ) ? $lang['Guest'] : $row['username'];
! $row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
! $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
!
! $template->assign_block_vars('userrow', array(
! 'ROW_COLOR' => '#' . $row_color,
! 'ROW_CLASS' => $row_class,
! 'USERNAME' => $username,
! '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"))
! );
! $i++;
! }
! while ( $row = $db->sql_fetchrow($result) );
}
! $template->pparse('viewip');
break;
***************
*** 962,965 ****
--- 974,981 ----
'L_LOCK' => $lang['Lock'],
'L_UNLOCK' => $lang['Unlock'],
+ 'L_TOPICS' => $lang['Topics'],
+ 'L_REPLIES' => $lang['Replies'],
+ 'L_LASTPOST' => $lang['Last_Post'],
+ 'L_SELECT' => $lang['Select'],
'U_VIEW_FORUM' => append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id"),
***************
*** 1019,1024 ****
}
- $folder_image = '<img src="' . $folder_img . '" alt="' . $folder_alt . '" title="' . $folder_alt . '" />';
-
$topic_id = $row['topic_id'];
$topic_type = $row['topic_type'];
--- 1035,1038 ----
***************
*** 1061,1070 ****
'U_VIEW_TOPIC' => $u_view_topic,
! 'FOLDER_IMG' => $folder_image,
'TOPIC_TYPE' => $topic_type,
'TOPIC_TITLE' => $topic_title,
'REPLIES' => $topic_replies,
! 'LAST_POST' => $last_post_time,
! 'TOPIC_ID' => $topic_id)
);
}
--- 1075,1086 ----
'U_VIEW_TOPIC' => $u_view_topic,
! 'TOPIC_FOLDER_IMG' => $folder_img,
'TOPIC_TYPE' => $topic_type,
'TOPIC_TITLE' => $topic_title,
'REPLIES' => $topic_replies,
! 'LAST_POST_TIME' => $last_post_time,
! 'TOPIC_ID' => $topic_id,
!
! 'L_TOPIC_FOLDER_ALT' => $folder_alt)
);
}
***************
*** 1072,1078 ****
$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'])
);
--- 1088,1092 ----
Index: posting.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/posting.php,v
retrieving revision 1.157
retrieving revision 1.158
diff -C2 -r1.157 -r1.158
*** posting.php 28 Mar 2002 19:52:21 -0000 1.157
--- posting.php 31 Mar 2002 00:06:33 -0000 1.158
***************
*** 22,26 ****
define('IN_PHPBB', true);
! $phpbb_root_path = "./";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
--- 22,26 ----
define('IN_PHPBB', true);
! $phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
***************
*** 56,60 ****
// that review ...
//
! if( $mode == 'topicreview' )
{
require($phpbb_root_path . 'includes/topic_review.'.$phpEx);
--- 56,60 ----
// that review ...
//
! if ( $mode == 'topicreview' )
{
require($phpbb_root_path . 'includes/topic_review.'.$phpEx);
***************
*** 63,69 ****
exit;
}
! else if( $mode == 'smilies' )
{
! generate_smilies("window", PAGE_POSTING);
exit;
}
--- 63,69 ----
exit;
}
! else if ( $mode == 'smilies' )
{
! generate_smilies('window', PAGE_POSTING);
exit;
}
***************
*** 73,77 ****
// page, no point in continuing with any further checks
//
! if( isset($HTTP_POST_VARS['cancel']) )
{
if ( $post_id )
--- 73,77 ----
// page, no point in continuing with any further checks
//
! if ( isset($HTTP_POST_VARS['cancel']) )
{
if ( $post_id )
***************
*** 96,100 ****
}
! header('Location: ' . append_sid($redirect) . $post_append, true);
}
--- 96,102 ----
}
! $header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
! header($header_location . append_sid($redirect) . $post_append, true);
! exit;
}
***************
*** 115,123 ****
{
case 'newtopic':
! if( $topic_type == POST_ANNOUNCE )
{
$is_auth_type = 'auth_announce';
}
! else if( $topic_type == POST_STICKY )
{
$is_auth_type = 'auth_sticky';
--- 117,125 ----
{
case 'newtopic':
! if ( $topic_type == POST_ANNOUNCE )
{
$is_auth_type = 'auth_announce';
}
! else if ( $topic_type == POST_STICKY )
{
$is_auth_type = 'auth_sticky';
***************
*** 191,197 ****
}
! $select_sql = ( !$submit ) ? ", t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig" : "";
! $from_sql = ( !$submit ) ? ", " . POSTS_TEXT_TABLE . " pt, " . USERS_TABLE . " u" : "";
! $where_sql = ( !$submit ) ? "AND pt.post_id = p.post_id AND u.user_id = p.poster_id" : "";
$sql = "SELECT f.*, t.topic_id, t.topic_status, t.topic_type, t.topic_first_post_id, t.topic_last_post_id, t.topic_vote, p.post_id, p.poster_id" . $select_sql . "
--- 193,199 ----
}
! $select_sql = ( !$submit ) ? ", t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig" : '';
! $from_sql = ( !$submit ) ? ", " . POSTS_TEXT_TABLE . " pt, " . USERS_TABLE . " u" : '';
! $where_sql = ( !$submit ) ? "AND pt.post_id = p.post_id AND u.user_id = p.poster_id" : '';
$sql = "SELECT f.*, t.topic_id, t.topic_status, t.topic_type, t.topic_first_post_id, t.topic_last_post_id, t.topic_vote, p.post_id, p.poster_id" . $select_sql . "
***************
*** 246,250 ****
if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, "Couldn't obtain vote data for this topic", "", __LINE__, __FILE__, $sql);
}
--- 248,252 ----
if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, 'Could not obtain vote data for this topic', '', __LINE__, __FILE__, $sql);
}
***************
*** 277,290 ****
if ( $post_info['poster_id'] != $userdata['user_id'] && !$is_auth['auth_mod'] )
{
! $message = ( $delete || $mode == "delete" ) ? $lang['Delete_own_posts'] : $lang['Edit_own_posts'];
$message .= '<br /><br />' . sprintf($lang['Click_return_topic'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . '">', '</a>');
message_die(GENERAL_MESSAGE, $message);
}
! else if ( !$post_data['last_post'] && !$is_auth['auth_mod'] && ( $mode == "delete" || $delete ) )
{
message_die(GENERAL_MESSAGE, $lang['Cannot_delete_replied']);
}
! else if ( !$post_data['edit_poll'] && !$is_auth['auth_mod'] && ( $mode == "poll_delete" || $poll_delete ) )
{
message_die(GENERAL_MESSAGE, $lang['Cannot_delete_poll']);
--- 279,292 ----
if ( $post_info['poster_id'] != $userdata['user_id'] && !$is_auth['auth_mod'] )
{
! $message = ( $delete || $mode == 'delete' ) ? $lang['Delete_own_posts'] : $lang['Edit_own_posts'];
$message .= '<br /><br />' . sprintf($lang['Click_return_topic'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . '">', '</a>');
message_die(GENERAL_MESSAGE, $message);
}
! else if ( !$post_data['last_post'] && !$is_auth['auth_mod'] && ( $mode == 'delete' || $delete ) )
{
message_die(GENERAL_MESSAGE, $lang['Cannot_delete_replied']);
}
! else if ( !$post_data['edit_poll'] && !$is_auth['auth_mod'] && ( $mode == 'poll_delete' || $poll_delete ) )
{
message_die(GENERAL_MESSAGE, $lang['Cannot_delete_poll']);
***************
*** 335,339 ****
}
! $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;
--- 337,341 ----
}
! $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;
***************
*** 384,388 ****
if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, "Couldn't obtain topic watch information", "", __LINE__, __FILE__, $sql);
}
--- 386,390 ----
if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, 'Could not obtain topic watch information', '', __LINE__, __FILE__, $sql);
}
***************
*** 400,404 ****
// What shall we do?
//
! if ( ( $delete || $poll_delete || $mode == "delete" ) && !$confirm )
{
//
--- 402,406 ----
// What shall we do?
//
! if ( ( $delete || $poll_delete || $mode == 'delete' ) && !$confirm )
{
//
***************
*** 451,455 ****
if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, "Couldn't obtain vote data for this topic", "", __LINE__, __FILE__, $sql);
}
--- 453,457 ----
if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, 'Could not obtain vote data for this topic', '', __LINE__, __FILE__, $sql);
}
***************
*** 464,468 ****
if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, "Couldn't obtain user vote data for this topic", "", __LINE__, __FILE__, $sql);
}
--- 466,470 ----
if ( !($result = $db->sql_query($sql)) )
{
! message_die(GENERAL_ERROR, 'Could not obtain user vote data for this topic', '', __LINE__, __FILE__, $sql);
}
***************
*** 475,479 ****
if ( !$db->sql_query($sql, BEGIN_TRANSACTION) )
{
! message_die(GENERAL_ERROR, "Couldn't update poll result", "", __LINE__, __FILE__, $sql);
}
--- 477,481 ----
if ( !$db->sql_query($sql, BEGIN_TRANSACTION) )
{
! message_die(GENERAL_ERROR, 'Could not update poll result', '', __LINE__, __FILE__, $sql);
}
***************
*** 482,486 ****
if ( !$db->sql_query($sql, END_TRANSACTION) )
{
! message_die(GENERAL_ERROR, "Couldn't insert user_id for poll", "", __LINE__, __FILE__, $sql);
}
--- 484,488 ----
if ( !$db->sql_query($sql, END_TRANSACTION) )
{
! message_die(GENERAL_ERROR, "Could not insert user_id for poll", "", __LINE__, __FILE__, $sql);
}
***************
*** 688,692 ****
'L_POST_SUBJECT' => $lang['Post_subject'],
'L_PREVIEW' => $lang['Preview'],
! 'L_POSTED' => $lang['Posted'])
);
$template->assign_var_from_handle('POST_PREVIEW_BOX', 'preview');
--- 690,695 ----
'L_POST_SUBJECT' => $lang['Post_subject'],
'L_PREVIEW' => $lang['Preview'],
! 'L_POSTED' => $lang['Posted'],
! 'L_POST' => $lang['Post'])
);
$template->assign_var_from_handle('POST_PREVIEW_BOX', 'preview');
***************
*** 792,796 ****
if( $user_sig != '' )
{
! $template->assign_block_vars('signature_checkbox', array());
}
--- 795,799 ----
if( $user_sig != '' )
{
! $template->assign_block_vars('switch_signature_checkbox', array());
}
***************
*** 801,805 ****
{
$html_status = $lang['HTML_is_ON'];
! $template->assign_block_vars('html_checkbox', array());
}
else
--- 804,808 ----
{
$html_status = $lang['HTML_is_ON'];
! $template->assign_block_vars('switch_html_checkbox', array());
}
else
***************
*** 814,818 ****
{
$bbcode_status = $lang['BBCode_is_ON'];
! $template->assign_block_vars('bbcode_checkbox', array());
}
else
--- 817,821 ----
{
$bbcode_status = $lang['BBCode_is_ON'];
! $template->assign_block_vars('switch_bbcode_checkbox', array());
}
else
***************
*** 827,831 ****
{
$smilies_status = $lang['Smilies_are_ON'];
! $template->assign_block_vars('smilies_checkbox', array());
}
else
--- 830,834 ----
{
$smilies_status = $lang['Smilies_are_ON'];
! $template->assign_block_vars('switch_smilies_checkbox', array());
}
else
***************
*** 836,840 ****
if( !$userdata['session_logged_in'] || ( $mode == 'editpost' && $post_info['poster_id'] == ANONYMOUS ) )
{
! $template->assign_block_vars('username_select', array());
}
--- 839,843 ----
if( !$userdata['session_logged_in'] || ( $mode == 'editpost' && $post_info['poster_id'] == ANONYMOUS ) )
{
! $template->assign_block_vars('switch_username_select', array());
}
***************
*** 846,850 ****
if ( $mode != 'editpost' || ( $mode == 'editpost' && $post_info['poster_id'] != ANONYMOUS ) )
{
! $template->assign_block_vars('notify_checkbox', array());
}
}
--- 849,853 ----
if ( $mode != 'editpost' || ( $mode == 'editpost' && $post_info['poster_id'] != ANONYMOUS ) )
{
! $template->assign_block_vars('switch_notify_checkbox', array());
}
}
***************
*** 855,859 ****
if ( $mode == 'editpost' && ( ( $is_auth['auth_delete'] && $post_data['last_post'] && ( !$post_data['has_poll'] || $post_data['edit_poll'] ) ) || $is_auth['auth_mod'] ) )
{
! $template->assign_block_vars('delete_checkbox', array());
}
--- 858,862 ----
if ( $mode == 'editpost' && ( ( $is_auth['auth_delete'] && $post_data['last_post'] && ( !$post_data['has_poll'] || $post_data['edit_poll'] ) ) || $is_auth['auth_mod'] ) )
{
! $template->assign_block_vars('switch_delete...
[truncated message content] |