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 @@
format('m/d/y h:s A'); - ?> + $startDate = $row['date_time']; + $start = new DateTime($startDate); + $timestring = $start->format('m/d/y h:s A'); + $time_arr = str_split($timestring); + if($time_arr[count($time_arr) - 8] === '0') + unset($time_arr[count($time_arr) - 8]); + echo implode("",$time_arr); + ?>
@@ -53,10 +57,14 @@
format('m/d/y h:s A'); - ?> + $startDate = $post['date_time']; + $start = new DateTime($startDate); + $timestring = $start->format('m/d/y h:s A'); + $time_arr = str_split($timestring); + if($time_arr[count($time_arr) - 8] === '0') + unset($time_arr[count($time_arr) - 8]); + echo implode("",$time_arr); + ?>
diff --git a/www/application/views/login.php b/www/application/views/login.php index 9bc3fc2..a7fb579 100644 --- a/www/application/views/login.php +++ b/www/application/views/login.php @@ -1,7 +1,8 @@ load->library('form_validation'); echo validation_errors(); - echo form_open('login'); ?> + echo form_open('login'); + ?>
Twitter
@@ -19,3 +20,7 @@
+ + + + diff --git a/www/application/views/register.php b/www/application/views/register.php index 53b8ce5..3045c72 100644 --- a/www/application/views/register.php +++ b/www/application/views/register.php @@ -38,3 +38,8 @@
+ + + + + diff --git a/www/application/views/templates/header.php b/www/application/views/templates/header.php index ae38645..63a8bb1 100644 --- a/www/application/views/templates/header.php +++ b/www/application/views/templates/header.php @@ -6,6 +6,7 @@ + diff --git a/www/application/views/templates/nav.php b/www/application/views/templates/nav.php index 4c9ec14..ae34f99 100644 --- a/www/application/views/templates/nav.php +++ b/www/application/views/templates/nav.php @@ -1,12 +1,12 @@ diff --git a/www/application/views/user.php b/www/application/views/user.php index dd61f01..b61a197 100644 --- a/www/application/views/user.php +++ b/www/application/views/user.php @@ -6,7 +6,8 @@
- + +
@@ -24,7 +25,11 @@ format('m/d/y h:s A'); + $timestring = $start->format('m/d/y h:s A'); + $time_arr = str_split($timestring); + if($time_arr[count($time_arr) - 8] === '0') + unset($time_arr[count($time_arr) - 8]); + echo implode("",$time_arr); ?>
diff --git a/www/css/styles.css b/www/css/styles.css index 83fe8f1..6670c45 100644 --- a/www/css/styles.css +++ b/www/css/styles.css @@ -1,5 +1,6 @@ body { background-color: #E3F3FD; + font-family: 'Source Sans Pro', sans-serif; } img.home-icon {