diff --git a/www/application/controllers/All_Tweets.php b/www/application/controllers/All_Tweets.php index 6974b1a..df80855 100644 --- a/www/application/controllers/All_Tweets.php +++ b/www/application/controllers/All_Tweets.php @@ -7,7 +7,7 @@ function __Construct(){ parent::__Construct (); $this->load->database(); // load database $this->load->model('All_Tweets_Model'); // load model - $this->output->enable_profiler(TRUE); + //$this->output->enable_profiler(TRUE); } public function index() { diff --git a/www/application/controllers/Login.php b/www/application/controllers/Login.php index 2fb8078..3a5fee6 100644 --- a/www/application/controllers/Login.php +++ b/www/application/controllers/Login.php @@ -11,6 +11,7 @@ function __Construct(){ public function index(){ $this->load->helper(array('form', 'url')); $this->load->library('form_validation'); + $this->form_validation->set_error_delimiters('', ''); $this->form_validation->set_rules('username', 'Username', 'required'); $this->form_validation->set_rules('password', 'Password', 'required'); @@ -18,7 +19,6 @@ public function index(){ if ($this->form_validation->run() == FALSE){ $this->load->view('templates/header'); $this->load->view('login'); - $this->load->view('templates/footer'); } @@ -37,7 +37,6 @@ public function index(){ else { $this->load->view('templates/header'); $this->load->view('login', $data); - $this->load->view('templates/footer'); } } diff --git a/www/application/controllers/Register.php b/www/application/controllers/Register.php index 5b6db13..603ce97 100644 --- a/www/application/controllers/Register.php +++ b/www/application/controllers/Register.php @@ -5,7 +5,7 @@ function __Construct(){ parent::__Construct(); $this->load->database(); // load database $this->load->model('User_Info_Model'); // load model - $this->output->enable_profiler(TRUE); + //$this->output->enable_profiler(TRUE); } public function index(){ @@ -25,7 +25,6 @@ public function index(){ if ($this->form_validation->run() == FALSE){ $this->load->view('templates/header'); $this->load->view('register'); - $this->load->view('templates/footer'); } // load the homepage once properly submitted diff --git a/www/application/controllers/User_Tweets.php b/www/application/controllers/User_Tweets.php index 8f7cedb..758e1f3 100644 --- a/www/application/controllers/User_Tweets.php +++ b/www/application/controllers/User_Tweets.php @@ -8,10 +8,11 @@ function __Construct(){ //$this->load->library('session'); $this->load->database(); // load database $this->load->model('User_Tweets_Model'); // load model - $this->output->enable_profiler(TRUE); + //$this->output->enable_profiler(TRUE); } public function index() { + // get posts based on user ID $this->data['posts'] = $this->User_Tweets_Model->getPosts(); // calling Post model method getPosts() $this->load->view('templates/header', NULL); $this->load->view('templates/nav', NULL); diff --git a/www/application/models/User_Tweets_Model.php b/www/application/models/User_Tweets_Model.php index 7e066d2..71b9b06 100644 --- a/www/application/models/User_Tweets_Model.php +++ b/www/application/models/User_Tweets_Model.php @@ -1,11 +1,9 @@ db->select("first_name, last_name, username, tweet, date_time"); $this->db->from('Users, Tweets'); - $this->db->where("Users.id = Tweets.user_id and Users.id = $user_id"); + $this->db->where("Users.id = Tweets.user_id"); $this->db->order_by('date_time', 'DESC'); $query = $this->db->get(); return $query->result_array(); diff --git a/www/application/views/home.php b/www/application/views/home.php index b981a2b..e3eafcf 100644 --- a/www/application/views/home.php +++ b/www/application/views/home.php @@ -31,10 +31,14 @@