завершение окраски ников git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@236 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293
This commit is contained in:
nanosimbiot 2011-08-21 15:42:32 +00:00
commit 5b2735f2d0
11 changed files with 51 additions and 80 deletions

View file

@ -316,8 +316,8 @@ else
$base_url = "admin_user_search.php?dosearch=true";
$select_sql = "SELECT u.user_id, u.username, u.user_email, u.user_posts, u.user_regdate, u.user_level, u.user_active, u.user_lastvisit
FROM ".BB_USERS." AS u";
$select_sql = "SELECT u.user_id, u.username, u.user_rank, u.user_email, u.user_posts, u.user_regdate, u.user_level, u.user_active, u.user_lastvisit
FROM ". BB_USERS ." AS u";
$lower_b = 'LOWER(';
$lower_e = ')';
@ -1271,7 +1271,7 @@ else
}
$sql = "SELECT ban_userid AS user_id
FROM ".BB_BANLIST."
FROM ". BB_BANLIST ."
WHERE ban_userid IN ($users_sql)";
if(!$result = DB()->sql_query($sql))
@ -1294,7 +1294,7 @@ else
$template->assign_block_vars('userrow', array(
'ROW_CLASS' => $row_class,
'USERNAME' => $rowset[$i]['username'],
'USER' => profile_url($rowset[$i]),
'EMAIL' => $rowset[$i]['user_email'],
'JOINDATE' => bb_date($rowset[$i]['user_regdate']),
'LASTVISIT' => bb_date($rowset[$i]['user_lastvisit']),
@ -1302,7 +1302,6 @@ else
'BAN' => ( ( !isset($banned[$rowset[$i]['user_id']]) ) ? $lang['NOT_BANNED'] : $lang['BANNED'] ),
'ABLED' => ( ( $rowset[$i]['user_active'] ) ? $lang['ENABLED'] : $lang['DISABLED'] ),
'U_VIEWPROFILE' => append_sid("../profile.php?mode=viewprofile&".POST_USERS_URL."=".$rowset[$i]['user_id']),
'U_VIEWPOSTS' => append_sid("../search.php?search_author=1&uid={$rowset[$i]['user_id']}"),
'U_MANAGE' => append_sid("../profile.php?mode=editprofile&".POST_USERS_URL."=".$rowset[$i]['user_id']),
'U_PERMISSIONS' => append_sid("admin_ug_auth.php?mode=user&".POST_USERS_URL."=".$rowset[$i]['user_id']),

View file

@ -306,7 +306,7 @@ if ($tor_reged && $tor_info)
}
else if ($s_mode == 'names')
{
$sql = "SELECT tr.user_id, tr.ip, tr.port, tr.remain, tr.seeder, u.username
$sql = "SELECT tr.user_id, tr.ip, tr.port, tr.remain, tr.seeder, u.username, u.user_rank
FROM ". BB_BT_TRACKER ." tr, ". BB_USERS ." u
WHERE tr.topic_id = $tor_id
AND u.user_id = tr.user_id
@ -319,7 +319,7 @@ if ($tor_reged && $tor_info)
$sql = "SELECT
tr.user_id, tr.ip, tr.port, tr.uploaded, tr.downloaded, tr.remain,
tr.seeder, tr.releaser, tr.speed_up, tr.speed_down, tr.update_time,
u.username
u.username, u.user_rank
FROM ". BB_BT_TRACKER ." tr
LEFT JOIN ". BB_USERS ." u ON u.user_id = tr.user_id
WHERE tr.topic_id = $tor_id
@ -415,12 +415,7 @@ if ($tor_reged && $tor_info)
{
$ip = bt_show_ip($peer['ip']);
$port = bt_show_port($peer['port']);
$guest = ($peer['user_id'] == ANONYMOUS || is_null($peer['username']));
if (isset($peer['user_id']) && $guest)
{
$peer['username'] = 'Guest';
}
// peer max/current up/down
$p_max_up = $peer['uploaded'];
$p_max_down = $peer['downloaded'];
@ -432,7 +427,6 @@ if ($tor_reged && $tor_info)
$x = 's';
$x_row = 'srow';
$x_full = 'sfull';
$link_class = 'seedmed';
if (!defined('SEEDER_EXIST'))
{
@ -460,7 +454,6 @@ if ($tor_reged && $tor_info)
$x = 'l';
$x_row = 'lrow';
$x_full = 'lfull';
$link_class = 'leechmed';
if (!defined('LEECHER_EXIST'))
{
@ -486,9 +479,8 @@ if ($tor_reged && $tor_info)
$compl_perc = ($compl_size) ? floor($compl_size * 100 / $tor_size) : 0;
}
if($userdata['user_id'] == $peer['user_id']) $link_class = 'itsme';
$rel_sign = (!$guest && $peer['releaser']) ? '<span class="'. $link_class .'">&nbsp;<b><sup>&reg;</sup></b>&nbsp;</span>' : '';
$name = '<a href="'. $u_prof_href .'" class="'. $link_class .'">'. wbr($peer['username']) .'</a>'. $rel_sign;
$rel_sign = (!$guest && $peer['releaser']) ? '&nbsp;<b><sup>&reg;</sup></b>' : '';
$name = profile_url($peer). $rel_sign;
$up_tot = ($p_max_up) ? humn_size($p_max_up) : '-';
$down_tot = ($p_max_down) ? humn_size($p_max_down) : '-';
$up_ratio = ($p_max_down) ? round(($p_max_up / $p_max_down), 2) : '';

View file

@ -713,7 +713,7 @@ function topic_review ($topic_id)
$review_posts = DB()->fetch_rowset("
SELECT
p.*, h.post_html, IF(h.post_html IS NULL, pt.post_text, NULL) AS post_text,
IF(p.poster_id = ". ANONYMOUS .", p.post_username, u.username) AS username, u.user_id
IF(p.poster_id = ". ANONYMOUS .", p.post_username, u.username) AS username, u.user_rank
FROM ". BB_POSTS ." p
LEFT JOIN ". BB_USERS ." u ON(u.user_id = p.poster_id)
LEFT JOIN ". BB_POSTS_TEXT ." pt ON(pt.post_id = p.post_id)
@ -726,12 +726,10 @@ function topic_review ($topic_id)
// Topic posts block
foreach ($review_posts as $i => $post)
{
$poster_name = ($post['username']) ? wbr($post['username']) : $lang['GUEST'];
$template->assign_block_vars('review', array(
'ROW_CLASS' => !($i % 2) ? 'row1' : 'row2',
'POSTER_NAME' => $poster_name,
'POSTER_NAME_JS' => addslashes($poster_name),
'POSTER' => profile_url($post),
'POSTER_NAME_JS' => addslashes($post['username']),
'POST_DATE' => bb_date($post['post_time'], $bb_cfg['post_date_format']),
'MESSAGE' => get_parsed_post($post),
));

View file

@ -404,7 +404,7 @@ function report_notify($mode)
// Obtain report information
//
$sql = 'SELECT r.report_id, r.report_module_id, r.report_subject, r.report_subject_data, r.report_title, r.report_desc,
rc.report_change_time, rc.report_change_comment, u.username
rc.report_change_time, rc.report_change_comment, u.username, u.user_rank
FROM ' . BB_REPORTS . ' r
INNER JOIN ' . BB_REPORTS_CHANGES . ' rc
ON rc.report_change_id = r.report_last_change
@ -732,7 +732,7 @@ function reports_obtain($module_id = null, $auth_check = true)
{
$where_sql = (isset($module_id)) ? 'AND r.report_module_id = ' . (int) $module_id : '';
$sql = 'SELECT r.report_id, r.user_id, r.report_time, r.report_module_id, r.report_status, r.report_subject,
r.report_subject_data, r.report_title, u.username
r.report_subject_data, r.report_title, u.username, u.user_rank
FROM ' . BB_REPORTS . ' r
LEFT JOIN ' . BB_USERS . ' u
ON u.user_id = r.user_id
@ -792,7 +792,7 @@ function reports_obtain($module_id = null, $auth_check = true)
function reports_open_obtain($module_id, $report_subject, $auth_check = true)
{
$sql = 'SELECT r.report_id, r.user_id, r.report_time, r.report_module_id, r.report_status, r.report_subject,
r.report_subject_data, r.report_title, u.username
r.report_subject_data, r.report_title, u.username, u.user_rank
FROM ' . BB_REPORTS . ' r
LEFT JOIN ' . BB_USERS . ' u
ON u.user_id = r.user_id
@ -839,7 +839,7 @@ function reports_open_obtain($module_id, $report_subject, $auth_check = true)
function reports_deleted_obtain($auth_check = true)
{
$sql = 'SELECT r.report_id, r.user_id, r.report_time, r.report_module_id, r.report_subject,
r.report_subject_data, r.report_title, u.username
r.report_subject_data, r.report_title, u.username, u.user_rank
FROM ' . BB_REPORTS . ' r
LEFT JOIN ' . BB_USERS . ' u
ON u.user_id = r.user_id
@ -886,7 +886,7 @@ function report_obtain($report_id, $auth_check = true)
global $bb_cfg, $lang;
$sql = 'SELECT r.report_id, r.user_id, r.report_time, r.report_module_id, r.report_status, r.report_subject,
r.report_subject_data, r.report_title, r.report_desc, rr.report_reason_desc, u.username
r.report_subject_data, r.report_title, r.report_desc, rr.report_reason_desc, u.username, u.user_rank
FROM ' . BB_REPORTS . ' r
LEFT JOIN ' . BB_REPORTS_REASONS . ' rr
ON rr.report_reason_id = r.report_reason_id
@ -940,7 +940,7 @@ function report_obtain($report_id, $auth_check = true)
//
function report_changes_obtain($report_id)
{
$sql = 'SELECT rc.user_id, rc.report_change_time, rc.report_status, rc.report_change_comment, u.username
$sql = 'SELECT rc.user_id, rc.report_change_time, rc.report_status, rc.report_change_comment, u.username, u.user_rank
FROM ' . BB_REPORTS_CHANGES . ' rc
LEFT JOIN ' . BB_USERS . ' u
ON u.user_id = rc.user_id

View file

@ -44,7 +44,7 @@ if ($show_dl_list)
}
else
{
$sql = "SELECT d.user_status, d.user_id, DATE_FORMAT(d.last_modified_dlstatus, '%Y-%m-%d') AS last_modified_dlstatus, u.username
$sql = "SELECT d.user_status, d.user_id, DATE_FORMAT(d.last_modified_dlstatus, '%Y-%m-%d') AS last_modified_dlstatus, u.username, u.user_rank
FROM ". BB_BT_DLSTATUS ." d, ". BB_USERS ." u
WHERE d.topic_id = $topic_id
AND d.user_id = u.user_id
@ -76,7 +76,7 @@ if ($show_dl_list)
else
{
$u_prof_href = ($u['user_id'] == ANONYMOUS) ? '#' : append_sid("profile.php?mode=viewprofile&amp;u=". $u['user_id']) .'#torrent';
$dl_cat[$u['user_status']] .= '<nobr><a class="'. $u_link_class .'" href="'. $u_prof_href .'" title="'. $u['last_modified_dlstatus'] .'">'. $u['username'] .'</a></nobr>, ';
$dl_cat[$u['user_status']] .= '<nobr><a class="'. $u_link_class .'" href="'. $u_prof_href .'" title="'. $u['last_modified_dlstatus'] .'">'. profile_url(array('username' => $u['username'], 'user_rank' => $u['user_rank'])) .'</a></nobr>, ';
$dl_count[$u['user_status']]++;
}
}

View file

@ -341,7 +341,7 @@ if (!IS_GUEST && $mode != 'newtopic' && ($submit || $preview || $mode == 'quote'
{
if ($topic_last_read = max(intval(@$tracking_topics[$topic_id]), intval(@$tracking_forums[$forum_id])))
{
$sql = "SELECT p.*, pt.post_text, u.username
$sql = "SELECT p.*, pt.post_text, u.username, u.user_rank
FROM ". BB_POSTS ." p, ". BB_POSTS_TEXT ." pt, ". BB_USERS ." u
WHERE p.topic_id = ". (int) $topic_id ."
AND u.user_id = p.poster_id
@ -356,19 +356,10 @@ if (!IS_GUEST && $mode != 'newtopic' && ($submit || $preview || $mode == 'quote'
foreach ($rowset as $i => $row)
{
if ($row['poster_id'] == ANONYMOUS)
{
$new_post_username = (!$row['post_username']) ? $lang['GUEST'] : $row['post_username'];
}
else
{
$new_post_username = $row['username'];
}
$template->assign_block_vars('new_posts', array(
'ROW_CLASS' => !($i % 2) ? 'row1' : 'row2',
'POSTER_NAME' => $new_post_username,
'POSTER_NAME_JS' => addslashes($new_post_username),
'POSTER' => profile_url($row),
'POSTER_NAME_JS' => addslashes($row['username']),
'POST_DATE' => bb_date($row['post_time'], $bb_cfg['post_date_format']),
'MESSAGE' => get_parsed_post($row),
));

View file

@ -421,11 +421,10 @@ else
{
$template->assign_block_vars('open_reports', array(
'U_SHOW' => append_sid("report.php?" . POST_REPORT_URL . '=' . $report['report_id']),
'U_AUTHOR' => append_sid("profile.php?mode=viewprofile&amp;" . POST_USERS_URL . '=' . $report['user_id']),
'ID' => $report['report_id'],
'TITLE' => $report['report_title'],
'AUTHOR' => $report['username'],
'AUTHOR' => profile_url($report),
'TIME' => bb_date($report['report_time']))
);
}
@ -506,12 +505,11 @@ else
{
$template->assign_block_vars('report_modules.reports', array(
'U_SHOW' => append_sid("report.php?" . POST_REPORT_URL . '=' . $report['report_id'] . $cat_url),
'U_AUTHOR' => append_sid("profile.php?mode=viewprofile&amp;" . POST_USERS_URL . '=' . $report['user_id']),
'ROW_CLASS' => $report_status_classes[$report['report_status']],
'ID' => $report['report_id'],
'TITLE' => (strlen($report['report_title'] > 53)) ? substr($report['report_title'], 0, 50) . '...' : $report['report_title'],
'AUTHOR' => $report['username'],
'AUTHOR' => profile_url($report),
'TIME' => bb_date($report['report_time']),
'STATUS' => $lang['REPORT_STATUS'][$report['report_status']])
);
@ -645,8 +643,7 @@ else
foreach ($report_changes as $report_change)
{
$u_report_change_user = append_sid("profile.php?mode=viewprofile&amp;" . POST_USERS_URL . '=' . $report_change['user_id']);
$report_change_user = '<a href="' . $u_report_change_user . '">' . $report_change['username'] . '</a>';
$report_change_user = profile_url($report_change);
$report_change_status = $lang['REPORT_STATUS'][$report_change['report_status']];
$report_change_time = bb_date($report_change['report_change_time']);
@ -668,11 +665,9 @@ else
}
$template->assign_block_vars('switch_report_changes.report_changes', array(
'U_USER' => $u_report_change_user,
'ROW_CLASS' => $report_status_classes[$report_change['report_status']],
'STATUS' => $report_change_status,
'USER' => $report_change['username'],
'USER' => $report_change_user,
'TIME' => $report_change_time,
'TEXT' => $report_change_text)
@ -683,10 +678,8 @@ else
// Assign last change information
//
$template->assign_vars(array(
'U_REPORT_LAST_CHANGE_USER' => $u_report_change_user,
'REPORT_LAST_CHANGE_TIME' => $report_change_time,
'REPORT_LAST_CHANGE_USER' => $report_change['username'])
'REPORT_LAST_CHANGE_USER' => profile_url($report_change))
);
}
@ -701,12 +694,11 @@ else
$template->assign_vars(array(
'S_HIDDEN_FIELDS' => '<input type="hidden" name="' . POST_REPORT_URL . '" value="' . $report['report_id'] . '" />',
'U_REPORT_AUTHOR' => append_sid("profile.php?mode=viewprofile&amp;" . POST_USERS_URL . '=' . $report['user_id']),
'U_REPORT_AUTHOR_PRIVMSG' => append_sid("privmsg.php?mode=post&amp;" . POST_USERS_URL . '=' . $report['user_id']),
'REPORT_TYPE' => $report_module->lang['REPORT_TYPE'],
'REPORT_TITLE' => $report['report_title'],
'REPORT_AUTHOR' => $report['username'],
'REPORT_AUTHOR' => profile_url($report),
'REPORT_TIME' => bb_date($report['report_time']),
'REPORT_DESC' => bbcode2html($report['report_desc']),
'REPORT_STATUS' => $lang['REPORT_STATUS'][$report['report_status']],
@ -748,12 +740,11 @@ else
$template->assign_block_vars('switch_deleted_reports.deleted_reports', array(
'U_SHOW' => append_sid("report.php?" . POST_REPORT_URL . '=' . $report['report_id'] . $cat_url),
'U_AUTHOR' => append_sid("profile.php?mode=viewprofile&amp;" . POST_USERS_URL . '=' . $report['user_id']),
'ID' => $report['report_id'],
'TITLE' => $report['report_title'],
'TYPE' => $report_module->lang['REPORT_TYPE'],
'AUTHOR' => $report['username'],
'AUTHOR' => profile_url($report),
'TIME' => bb_date($report['report_time']),
'STATUS' => $lang['REPORT_STATUS'][REPORT_DELETE])
);

View file

@ -176,16 +176,16 @@
<th>{L_ACCOUNT_STATUS}</th>
</tr>
<!-- BEGIN userrow -->
<tr>
<td class="{userrow.ROW_CLASS}" align="center" nowrap="nowrap"><span class="gen">&nbsp;<a href="{userrow.U_VIEWPROFILE}" class="gen">{userrow.USERNAME}</a>&nbsp;</span></td>
<td class="{userrow.ROW_CLASS}" align="center" nowrap="nowrap"><span class="gen">&nbsp;{userrow.EMAIL}&nbsp;</span></td>
<td class="{userrow.ROW_CLASS}" align="center" nowrap="nowrap"><span class="gen">&nbsp;{userrow.JOINDATE}&nbsp;</span></td>
<td class="{userrow.ROW_CLASS}" align="center" nowrap="nowrap"><span class="gen">&nbsp;<a href="{userrow.U_VIEWPOSTS}" class="gen">{userrow.POSTS}</a>&nbsp;</span></td>
<td class="{userrow.ROW_CLASS}" align="center" nowrap="nowrap"><span class="gen">&nbsp;{userrow.LASTVISIT}&nbsp;</span></td>
<td class="{userrow.ROW_CLASS}" align="center" nowrap="nowrap"><span class="gen">&nbsp;<a href="{userrow.U_MANAGE}" class="gen">{L_MANAGE}</a>&nbsp;</span></td>
<td class="{userrow.ROW_CLASS}" align="center" nowrap="nowrap"><span class="gen">&nbsp;<a href="{userrow.U_PERMISSIONS}" class="gen">{L_PERMISSIONS}</a>&nbsp;</span></td>
<td class="{userrow.ROW_CLASS}" align="center" nowrap="nowrap"><span class="gen">&nbsp;{userrow.BAN}&nbsp;</span></td>
<td class="{userrow.ROW_CLASS}" align="center" nowrap="nowrap"><span class="gen">&nbsp;{userrow.ABLED}&nbsp;</span></td>
<tr class="gen nowrap tCenter {userrow.ROW_CLASS}">
<td>&nbsp;{userrow.USER}&nbsp;</td>
<td>&nbsp;{userrow.EMAIL}&nbsp;</td>
<td>&nbsp;{userrow.JOINDATE}&nbsp;</td>
<td>&nbsp;<a href="{userrow.U_VIEWPOSTS}" class="gen">{userrow.POSTS}&nbsp;</span></td>
<td>&nbsp;{userrow.LASTVISIT}&nbsp;</td>
<td>&nbsp;<a href="{userrow.U_MANAGE}" class="gen">{L_MANAGE}</a>&nbsp;</td>
<td>&nbsp;<a href="{userrow.U_PERMISSIONS}" class="gen">{L_PERMISSIONS}</a>&nbsp;</td>
<td>&nbsp;{userrow.BAN}&nbsp;</td>
<td>&nbsp;{userrow.ABLED}&nbsp;</td>
</tr>
<!-- END userrow -->
<tr>

View file

@ -15,13 +15,13 @@
<tr class="{new_posts.ROW_CLASS}">
<td width="120" class="poster_info td1">
<p class="nick" onmouseout="bbcode.refreshSelection(false);" onmouseover="bbcode.refreshSelection(true);" onclick="bbcode.onclickPoster('{new_posts.POSTER_NAME_JS}');">
<a href="#" onclick="return false;">{new_posts.POSTER_NAME}</a>
<a href="#" onclick="return false;">{new_posts.POSTER}</a>
</p>
<p><img src="{SPACER}" width="120" height="10" alt="" /></p>
</td>
<td class="message td2">
<div class="post_head pad_4">{MINIPOST_IMG_NEW} {new_posts.POST_DATE}</div>
<div class="post_wrap">{new_posts.MESSAGE}</div>
<div class="post_wrap post_body">{new_posts.MESSAGE}</div>
</td>
</tr>
<!-- END new_posts -->
@ -41,7 +41,7 @@
<th>{L_PREVIEW}</th>
</tr>
<tr>
<td class="row1"><div class="post_wrap">{PREVIEW_MSG}</div></td>
<td class="row1"><div class="post_wrap post_body">{PREVIEW_MSG}</div></td>
</tr>
</table>
@ -170,13 +170,13 @@
<tr class="{review.ROW_CLASS}">
<td width="120" class="poster_info td1">
<p class="nick" onmouseout="bbcode.refreshSelection(false);" onmouseover="bbcode.refreshSelection(true);" onclick="bbcode.onclickPoster('{review.POSTER_NAME_JS}');">
<a href="#" onclick="return false;">{review.POSTER_NAME}</a>
<a href="#" onclick="return false;">{review.POSTER}</a>
</p>
<p><img src="{SPACER}" width="120" height="10" alt="" /></p>
</td>
<td class="message td2">
<div class="post_head pad_4">{MINIPOST_IMG} {review.POST_DATE}</div>
<div class="post_wrap">{review.MESSAGE}</div>
<div class="post_wrap post_body">{review.MESSAGE}</div>
</td>
</tr>
<!-- END review -->

View file

@ -71,7 +71,7 @@ function checked_toggle(form, status)
</strong>
<!-- END switch_current -->
<span class="gensmall">
{L_REPORT_BY} <a href="{report_modules.reports.U_AUTHOR}" class="gensmall">{report_modules.reports.AUTHOR}</a>
{L_REPORT_BY} {report_modules.reports.AUTHOR}
</span>
</td>
</tr>

View file

@ -45,7 +45,7 @@
<tr>
<td class="row2" width="25%"><span class="genmed">{L_REPORTED_BY}:</span></td>
<td class="row2"><span class="genmed">
<a href="{U_REPORT_AUTHOR}" class="genmed">{REPORT_AUTHOR}</a>&nbsp;
{REPORT_AUTHOR}&nbsp;
[ <a href="{U_REPORT_AUTHOR_PRIVMSG}" class="genmed">{L_SEND_PRIVATE_MESSAGE}</a> ]
</span></td>
</tr>
@ -79,7 +79,7 @@
<tr>
<td class="row2"><span class="genmed">{L_LAST_CHANGED_BY}:</span></td>
<td class="row2"><span class="genmed">
<a href="{U_REPORT_LAST_CHANGE_USER}" class="genmed">{REPORT_LAST_CHANGE_USER}</a> ({REPORT_LAST_CHANGE_TIME})
{REPORT_LAST_CHANGE_USER} ({REPORT_LAST_CHANGE_TIME})
</span></td>
</tr>
<!-- END switch_report_changes -->