-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.uconn.edu/shs12010/twitter-clone
- Loading branch information
Showing
16 changed files
with
192 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
Class Search_Model Extends CI_Model | ||
{ | ||
function __construct() | ||
{ | ||
parent::__construct(); | ||
$this->load->database(); // load database | ||
} | ||
|
||
function search($keyword) | ||
{ | ||
$this->db->like('tweet', $keyword); | ||
$query = $this->db->get('Tweets'); | ||
return $query->result(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
<!DOCTYPE html> | ||
|
||
<html lang="en"> | ||
<head> | ||
<title>Twitter Clone</title> | ||
<link type="text/css" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> | ||
<link rel="stylesheet" type="text/css" href="/css/styles.css"> | ||
<meta charset="utf-8"> | ||
</head> | ||
<body> | ||
<head> | ||
<title>Twitter Clone</title> | ||
<link type="text/css" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> | ||
<link rel="stylesheet" type="text/css" href="/css/styles.css"> | ||
<meta charset="utf-8"> | ||
</head> | ||
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,9 @@ | ||
<?php $this->load->library('form_validation'); ?> | ||
<?php echo validation_errors(); ?> | ||
<?php echo form_open('tweet'); ?> | ||
|
||
<h2><?php echo $title; ?></h2> | ||
|
||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-md-2 col-md-offset-5"> | ||
<h5>Tweet</h5> | ||
<input type="text" name="tweet" value="<?php echo set_value('tweet'); ?>" size="50" /> | ||
<?php echo form_error('tweet'); ?> | ||
<!--<input type="hidden" name="user_id" value="<?php echo 'id' // USER ID HERE for tweet creation ?>"/>--> | ||
<div><input class="btn" type="submit" value="Submit"/></div> | ||
</div> | ||
</div> | ||
</div> | ||
<h5>Tweet</h5> | ||
<input type="text" name="tweet" value="<?php echo set_value('tweet'); ?>" size="50" /> | ||
<?php echo form_error('tweet'); ?> | ||
<!--<input type="hidden" name="user_id" value="<?php echo 'id' // USER ID HERE for tweet creation ?>"/>--> | ||
<div><input type="submit" value="Submit"/></div> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,33 @@ | ||
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?> | ||
<h1>Tweets Feed</h1> | ||
<div class="container"> | ||
<div class="row"> | ||
<?php foreach($posts as $post){?> | ||
<div class="col-md-4"> | ||
<?php echo $post['first_name'];?> | ||
<?php echo $post['last_name'];?> | ||
<?php echo $post['username'];?> | ||
</div> | ||
<div class="col-md-8"> | ||
<?php echo $post['tweet'];?> | ||
<?php echo $post['date_time'];?> | ||
</div> | ||
<?php }?> | ||
</div> | ||
</div> | ||
<div class="home container"> | ||
<h1>My Tweets</h1> | ||
|
||
<?php $this->load->library('form_validation'); ?> | ||
<?php echo validation_errors(); ?> | ||
<?php echo form_open('user_tweets/create'); ?> | ||
<input type="text" name="tweet" value="<?php echo set_value('tweet'); ?>" size="50"/> | ||
<?php echo form_error('tweet'); ?> | ||
<!--<input type="hidden" name="user_id" value="<?php echo 'id' // USER ID HERE for tweet creation ?>"/>--> | ||
<div><input type="submit" value="Tweet"/></div> | ||
</form> | ||
|
||
|
||
<?php foreach($posts as $post){ ?> | ||
<div class="tweet-container"> | ||
<div class="row"> | ||
<div class="col-md-6"> | ||
<?php echo "<h3>" . $post['first_name'] . " " . $post['last_name'] . "</h3>"; ?> | ||
<?php echo "<h4>" . "@" . $post['username'] . "</h4>";?> | ||
</div> | ||
<div class="col-md-3 date"> | ||
<?php echo $post['date_time'];?> | ||
</div> | ||
</div> | ||
<div class="row tweet italic"> | ||
<div class="col-md-12"> | ||
<?php echo "\"" . $post['tweet'] . "\"";?> | ||
</div> | ||
</div> | ||
</div> | ||
<?php }?> | ||
</div> |