View file engine/services/profile_user_ban.php

File size: 500B
<?php

    if ($sql->query('SELECT COUNT(*) FROM `ban` WHERE `user_id` = '.$ank['id'].' AND `time` > '.$time)->result() > 0)
    {
        $ban = $sql->query('SELECT * FROM `ban` WHERE `user_id` = '.$ank['id'].' AND `time` > '.$time.' LIMIT 1')->fetch();
        echo '<div class="post">'.Core::user_show(Core::get_user($ban['moder_id']), 
            array('post' => 'Забанен по причине: ' . $ban['prich'], 'status' => 'Бан до '.Core::time($ban['time']))).'</div>';
    }