viewing paste Unknown #5434 | PHP

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
<?
    class Home extends CI_Controller {
        public function __construct() {
            parent::__construct();
            (!$this->session->userdata('user') || !$this->Login_model->check_user()) exit('');
        }
        public function index() {
            $this->load->model('ThisIsMy_Model', 'home_model')
            $data['poll'] = $this->home_model->get_poll();
            $data['news'] = $this->home_model->get_news();
            $data['user'] = $this->home_model->get_user();
            $this->load->view('header');
            $this->load->view('menu');
            $this->load->view('content', $data);
            $this->load->view('footer');
        }
    }
    class Profile extends CI_Controller {
        public function __construct() {
            parent::__construct();
            (!$this->session->userdata('user') || !$this->Login_model->check_user()) exit('');
        }
        public function index() {
            $this->load->model('ThisIsMy_Model', 'profile_model')
            $data['written'] = $this->home_model->articles_written();
            $data['voted'] = $this->home_model->polls_voted();
            $data['profile'] = $this->home_model->my_profile();
            $this->load->view('header');
            $this->load->view('menu');
            $this->load->view('content', $data);
            $this->load->view('footer');
        }
    }
?>
---------
<?
    class ThisIsMy_Model extends CI_Model {
        public function __construct() {
            parent::__construct();
        }
        public function get_poll() {
            //some queries ...
            return $row;
        }
        public function get_news() {
            //some queries ...
            return $row;
        }
        public function get_user() {
            //some queries ...
            return $row;
        }
        public function articles_written() {
            //some queries ...
            return $row;
        }
        public function polls_voted() {
            //some queries ...
            return $row;
        }
        public function my_profile() {
            //some queries ...
            return $row;
        }
    }
?>
Viewed 641 times, submitted by Guest.