diff --git a/upload/admin/admin_user_search.php b/upload/admin/admin_user_search.php
index 009810c86..11eba184d 100644
--- a/upload/admin/admin_user_search.php
+++ b/upload/admin/admin_user_search.php
@@ -106,7 +106,7 @@ if(!isset($_POST['dosearch'])&&!isset($_GET['dosearch']))
$template->assign_vars(array(
'TPL_ADMIN_USER_SEARCH_MAIN' => true,
-
+
'YEAR' => date("Y"),
'MONTH' => date("m"),
'DAY' => date("d"),
@@ -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']),
diff --git a/upload/attach_mod/displaying_torrent.php b/upload/attach_mod/displaying_torrent.php
index c88669bfc..2a587c37f 100644
--- a/upload/attach_mod/displaying_torrent.php
+++ b/upload/attach_mod/displaying_torrent.php
@@ -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']) ? ' ® ' : '';
- $name = ''. wbr($peer['username']) .''. $rel_sign;
+ $rel_sign = (!$guest && $peer['releaser']) ? ' ®' : '';
+ $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) : '';
diff --git a/upload/includes/functions_post.php b/upload/includes/functions_post.php
index 1285b6793..306ec9787 100644
--- a/upload/includes/functions_post.php
+++ b/upload/includes/functions_post.php
@@ -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),
));
diff --git a/upload/includes/functions_report.php b/upload/includes/functions_report.php
index 6f8eb7f00..997b82a83 100644
--- a/upload/includes/functions_report.php
+++ b/upload/includes/functions_report.php
@@ -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
diff --git a/upload/includes/torrent_show_dl_list.php b/upload/includes/torrent_show_dl_list.php
index d5953b07f..93ec3c10c 100644
--- a/upload/includes/torrent_show_dl_list.php
+++ b/upload/includes/torrent_show_dl_list.php
@@ -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&u=". $u['user_id']) .'#torrent';
- $dl_cat[$u['user_status']] .= '
- {new_posts.POSTER_NAME} + {new_posts.POSTER}
- {review.POSTER_NAME} + {review.POSTER}
{T_INDEX} |