Hello zappsan,
I've set a improvement of baninfo.php because
$db->query is deprecated on vb 3.6.1
PHP Code:
// Ban Info on User Profile Hack ? 2006 by zappsan (http://piforums.paulhq.com)
$baninfo = $db->query_first_slave("SELECT * FROM " . TABLE_PREFIX . "userban WHERE userid=" .$userinfo['userid']);
if ($baninfo['userid'])
{
echo '<table class="tborder" cellspacing="1" cellpadding="3" width="100%">
<tr>
<td class="tcat" colspan="3">Ban Information</td>
</tr>
<tr>
<td class="alt1"><b>Time banned: </b>';
if ($baninfo['liftdate'] == '0')
{
echo 'Forever</td>';
}
else
{
$bandate = vbdate($vbulletin->options['dateformat'], $baninfo['bandate'], false);
$liftdate = vbdate($vbulletin->options['dateformat'], $baninfo['liftdate'], false);
echo 'From '.$bandate.' to '.$liftdate.'</td>';
}
if (empty($baninfo['reason']))
{
echo '<td class="alt1"><b>Reason:</b> None</td>';
}
else
{
echo '<td class="alt1"><b>Reason:</b> '.$baninfo['reason'].'</td>';
}
echo '<td class="alt1"><b>Banned by: </b>';
$bannedby = $db->query_first("SELECT username FROM " . TABLE_PREFIX . "user WHERE userid=" .$baninfo['adminid']);
echo $bannedby['username'].'</td></tr></table><br />';
}
let me know if all right