Welcome Guest, Not a member yet? Register   Sign In
Banned system
#1

[eluser]iniweb[/eluser]
Code:

Code:
function Banned()
    {
        $banned = '';

        if($this->logged_in())
        {
            $username = $this->CI->session->userdata['username'];

            $query = $this->CI->db->query("SELECT status FROM `ci_users` WHERE username='$username'");

            foreach ($query->result() as $row)
            {
                if($row->status == '0')
                {
                    $data = array(
                                   'username'  => $username,
                             );

                    $banned .= $this->CI->parser->parse('Banned.tpl', $data);
                }
            }
        }

    return $banned;
    }

Main.php (Default controller on route)
Code:
function Main()
    {
        parent::Controller();
        $this->userlib->banned();
    }

But site work, how stop work site and show banned message?
#2

[eluser]Derek Allard[/eluser]
What about using a session to pass the message? If you look at the new session library in the svn (here) you can use flash variables to pass information.




Theme © iAndrew 2016 - Forum software by © MyBB