diff --git a/README.md b/README.md new file mode 100644 index 0000000..11ce451 --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +# Twitter Clone - Final Project +### Shemona Singh and Chris Stumper +### DMD 4470 + +This is a small web application that emulates the core functionality of Twitter. The app is built using PHP, MySQL and the CodeIgniter MVC framework. It allows for new user registration and tweet creation from the user, while utilizing Sessions for login/logout. + +### Running app locally +1. Clone this repo with ```git clone https://github.uconn.edu/shs12010/twitter-clone.git``` +2. Change directories to twitter-clone with ```cd twitter-clone``` +3. Run ```lando start``` +4. Run ```lando db-import db/lamp.sql``` +5. Launch the app in the browser at http://twitter-clone.lndo.site/index.php/login diff --git a/db/lamp_2017-12-03.sql b/db/lamp.sql similarity index 59% rename from db/lamp_2017-12-03.sql rename to db/lamp.sql index 310c54d..7cfa85c 100644 --- a/db/lamp_2017-12-03.sql +++ b/db/lamp.sql @@ -7,7 +7,7 @@ # # Host: 127.0.0.1 (MySQL 5.7.20) # Database: lamp -# Generation Time: 2017-12-04 00:14:29 +0000 +# Generation Time: 2017-12-06 01:23:04 +0000 # ************************************************************ @@ -28,7 +28,7 @@ DROP TABLE IF EXISTS `Tweets`; CREATE TABLE `Tweets` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `tweet` char(140) DEFAULT NULL, - `date_time` datetime DEFAULT NULL, + `date_time` datetime DEFAULT CURRENT_TIMESTAMP, `user_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; @@ -38,11 +38,26 @@ LOCK TABLES `Tweets` WRITE; INSERT INTO `Tweets` (`id`, `tweet`, `date_time`, `user_id`) VALUES - (1,'testing tweet! one two three','2004-01-01 00:00:00',1), - (2,'hiiii this is my second tweet','2003-01-01 02:06:27',1), - (3,'first twitter tweet omg so kewl','4094-01-01 01:35:10',2), - (4,'3rd tweet now so pro','7740-01-01 07:36:43',1), - (5,'tweet tweet tweet cant stop me now','3920-01-01 22:34:17',2); + (6,'I want a pet giraffe','2017-12-04 23:04:03',1), + (7,'Gucci is a waste of money','2017-12-04 23:21:27',2), + (8,'Twitter is so much koolier than Facebook','2017-12-04 23:21:58',1), + (9,'sup Brian','2017-12-04 23:23:28',2), + (10,'existentialism is my middle name','2017-12-04 23:29:53',2), + (11,'I hope I see another rainbow before I die','2017-12-04 23:47:59',1), + (12,'it\'s peanut butter jelly time','2017-12-05 00:13:28',1), + (13,'yellow is a gross color','2017-12-05 00:14:01',2), + (14,'abracadabra','2017-12-05 00:19:53',2), + (15,'mushrooms','2017-12-05 00:22:26',1), + (16,'Brian is the best professor ever','2017-12-05 00:23:49',2), + (17,'who needs Javascript?','2017-12-05 00:24:14',1), + (18,'the universe is meaningless','2017-12-05 02:38:37',2), + (19,'I like Steve Jobs','2017-12-05 05:22:14',2), + (20,'eggplant','2017-12-05 16:57:32',2), + (21,'my favorite slang word is swag','2017-12-05 17:12:49',1), + (22,'lettuce is a healthy vegetable','2017-12-05 18:36:51',2), + (23,'I wish I was a DMD major','2017-12-05 18:48:39',1), + (24,'PHP is my favorite language','2017-12-05 19:52:54',1), + (25,'I love twitter!','2017-12-05 23:49:05',2); /*!40000 ALTER TABLE `Tweets` ENABLE KEYS */; UNLOCK TABLES; @@ -60,7 +75,6 @@ CREATE TABLE `Users` ( `username` char(20) DEFAULT '', `password` text, `email` text, - `url` text, `location` text, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; @@ -68,10 +82,13 @@ CREATE TABLE `Users` ( LOCK TABLES `Users` WRITE; /*!40000 ALTER TABLE `Users` DISABLE KEYS */; -INSERT INTO `Users` (`id`, `first_name`, `last_name`, `username`, `password`, `email`, `url`, `location`) +INSERT INTO `Users` (`id`, `first_name`, `last_name`, `username`, `password`, `email`, `location`) VALUES - (1,'shemona','singh','mona','pass','shemona.singh@uconn.edu',NULL,'milford'), - (2,'chris','stumper','chris','pass2','chris.stumper@uconn.edu',NULL,'simsbury'); + (1,'shemona','singh','mona','pass','shemona.singh@uconn.edu','milford'), + (2,'chris','stumper','chris','pass2','chris.stumper@uconn.edu','simsbury'), + (3,'Chris','Singh','undair','haha','c@me.com','US'), + (4,'Shemona','Stumper','momo','pass3','mona@gmail.com','Cambridge'), + (5,'bob','jones','bob','bob','bob@bob.com','bobtown'); /*!40000 ALTER TABLE `Users` ENABLE KEYS */; UNLOCK TABLES; diff --git a/www/application/views/templates/footer.php b/www/application/views/templates/footer.php index b404e09..514898e 100644 --- a/www/application/views/templates/footer.php +++ b/www/application/views/templates/footer.php @@ -1,5 +1,5 @@

- © 2017 Stingh Design + © 2017 Monis Simper Design