|
From: Paul S. O. <ps...@us...> - 2002-01-13 15:29:17
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv15995/includes
Modified Files:
page_header.php
Log Message:
Highlight admin/mods update to whos online
Index: page_header.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/page_header.php,v
retrieving revision 1.86
retrieving revision 1.87
diff -C2 -r1.86 -r1.87
*** page_header.php 2002/01/12 01:03:01 1.86
--- page_header.php 2002/01/13 15:29:14 1.87
***************
*** 90,93 ****
--- 90,100 ----
// situation
//
+ /*
+ if( !empty($forum_id) )
+ {
+ $user_forum_sql = "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
***************
*** 95,98 ****
--- 102,106 ----
AND ( s.session_time >= ".( time() - 300 ) . "
OR u.user_session_time >= " . ( time() - 300 ) . " )
+ $user_forum_sql
ORDER BY u.username ASC";
$result = $db->sql_query($sql);
***************
*** 117,133 ****
if( $row['user_id'] != $prev_user_id )
{
if( $row['user_level'] == ADMIN )
{
$row['username'] = '<b>' . $row['username'] . '</b>';
}
if( $row['user_allow_viewonline'] )
{
! $user_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '">' . $row['username'] . '</a>';
$logged_visible_online++;
}
else
{
! $user_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"><i>' . $row['username'] . '</i></a>';
$logged_hidden_online++;
}
--- 125,148 ----
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>';
+ $style_color = 'style="color:' . $theme['fontcolor2'] . '"';
}
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>';
$logged_visible_online++;
}
else
{
! $user_online_link = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '"' . $style_color .'><i>' . $row['username'] . '</i></a>';
$logged_hidden_online++;
}
***************
*** 341,345 ****
"L_SEARCH_NEW" => $lang['Search_new'],
"L_SEARCH_UNANSWERED" => $lang['Search_unanswered'],
! "L_SEARCH_SELF" => $lang['Search_your_posts'],
"U_SEARCH_UNANSWERED" => append_sid("search.".$phpEx."?search_id=unanswered"),
--- 356,362 ----
"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"),
|