mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Some improvements for Ban functionality (#1262)
* Some improvements for Ban functionality * Updated * Updated * Update functions.php * Updated * Update viewprofile.php * Update viewtopic.php * Updated * Updated * Updated * Updated * Update mysql.sql * Updated * Updated
This commit is contained in:
parent
d090678e14
commit
7beb4afa72
18 changed files with 83 additions and 272 deletions
|
@ -74,9 +74,12 @@ if (bf($profiledata['user_opt'], 'user_opt', 'dis_sig')) {
|
|||
$signature = bbcode2html($signature);
|
||||
}
|
||||
|
||||
$user_banned = false;
|
||||
if (DB()->fetch_row('SELECT ban_userid FROM ' . BB_BANLIST . " WHERE ban_userid = {$profiledata['user_id']} LIMIT 1")) {
|
||||
$user_banned = true;
|
||||
// Ban information
|
||||
if ($banInfo = getUserBanInfo($profiledata['user_id'])) {
|
||||
$template->assign_block_vars('ban', [
|
||||
'IS_BANNED' => true,
|
||||
'BAN_REASON' => $banInfo['ban_reason']
|
||||
]);
|
||||
}
|
||||
|
||||
$template->assign_vars([
|
||||
|
@ -85,7 +88,6 @@ $template->assign_vars([
|
|||
'PROFILE_USER_ID' => $profiledata['user_id'],
|
||||
'PROFILE_USER' => $profile_user_id,
|
||||
'USER_REGDATE' => bb_date($profiledata['user_regdate'], 'Y-m-d H:i', false),
|
||||
'BANNED' => $user_banned,
|
||||
'POSTER_RANK' => ($poster_rank) ? "<span class=\"$rank_style\">" . $poster_rank . "</span>" : $lang['USER'],
|
||||
'RANK_IMAGE' => $rank_image,
|
||||
'RANK_SELECT' => $rank_select,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue