├── like.png ├── 2FAoff.PNG ├── 2FAon.PNG ├── Thumbs.db ├── favicon1.png ├── messages.png ├── FinalSchema.PNG ├── GITHUBLogin.PNG ├── favicon_IY.png ├── favicon_IY_bg.png ├── login ├── contact.PNG ├── Logo_idYeah.png ├── img_avatar2.png ├── img_avatar4.png ├── connect.php ├── login.css ├── securityCheck.php ├── login.php ├── validate.php └── gitLogin.php ├── screenShots ├── 1.JPG ├── 2.JPG ├── 3.JPG ├── Thumbs.db ├── like.PNG ├── LogOut.PNG ├── dislike.PNG ├── ProfilePic.PNG ├── createChannel.png ├── postingOptions.PNG ├── createNewChannel.PNG ├── userProfileSearch.PNG ├── listOfChannelMembers.PNG └── InviteMembersToChannel.png ├── UserMetricsGraps.PNG ├── assets ├── images │ ├── Thumbs.db │ └── coniglio_rabbit_small.png ├── channelImages │ ├── .png │ ├── 235.png │ ├── 236.png │ ├── 237.png │ ├── 238.png │ ├── 246.png │ ├── 251.png │ └── Thumbs.db ├── upload │ └── health_id.pdf ├── screenShots │ ├── Newchannel.PNG │ ├── demoscriptTesting.PNG │ ├── existingChannels.PNG │ ├── noPrivateChannel.PNG │ ├── inviteUsesto Existing Channel.PNG │ └── codeForInsertingNotExisting User.PNG ├── helpPageScreenShots │ ├── Thumbs.db │ ├── like.PNG │ ├── post.PNG │ ├── react.PNG │ ├── reply.PNG │ ├── Signup.PNG │ ├── archive.PNG │ ├── dislike.PNG │ ├── logout.png │ ├── search.png │ ├── ProfilePic.png │ ├── createNewChanne.png │ ├── create_channel.PNG │ ├── postingOptions.PNG │ ├── userProfileSearch.PNG │ ├── listOfChannelMembers.png │ ├── InviteMembersToChannel.png │ └── InviteUserWhileCreatingChannel.png └── php │ └── class.pop3.php ├── signOut.php ├── uploadImage.html ├── search.php ├── messages ├── messages.css └── messages.php ├── signup ├── signUpPage.css └── signUpPage.php ├── inviteMembers.php ├── profilePage.css ├── uploadImage.php ├── upLoadDocument.php ├── userProfile.php ├── createChannel.php ├── logInAcitvity.php ├── uploadImageInToChannel.php ├── inviteMembersToChannel.php ├── profilePage.php ├── css └── tags │ ├── tokenfield-typeahead.css │ ├── bootstrap-tokenfield.css │ ├── jquery-migrate-3.0.0.min.js │ └── typeahead.bundle.min.js ├── README.md ├── newChannel.php ├── helpPage.html ├── index.css ├── milestone4dump.sql └── milestoneDumps └── milestone2dump.sql /like.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/like.png -------------------------------------------------------------------------------- /2FAoff.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/2FAoff.PNG -------------------------------------------------------------------------------- /2FAon.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/2FAon.PNG -------------------------------------------------------------------------------- /Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/Thumbs.db -------------------------------------------------------------------------------- /favicon1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/favicon1.png -------------------------------------------------------------------------------- /messages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/messages.png -------------------------------------------------------------------------------- /FinalSchema.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/FinalSchema.PNG -------------------------------------------------------------------------------- /GITHUBLogin.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/GITHUBLogin.PNG -------------------------------------------------------------------------------- /favicon_IY.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/favicon_IY.png -------------------------------------------------------------------------------- /favicon_IY_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/favicon_IY_bg.png -------------------------------------------------------------------------------- /login/contact.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/login/contact.PNG -------------------------------------------------------------------------------- /screenShots/1.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/screenShots/1.JPG -------------------------------------------------------------------------------- /screenShots/2.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/screenShots/2.JPG -------------------------------------------------------------------------------- /screenShots/3.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/screenShots/3.JPG -------------------------------------------------------------------------------- /UserMetricsGraps.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/UserMetricsGraps.PNG -------------------------------------------------------------------------------- /login/Logo_idYeah.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/login/Logo_idYeah.png -------------------------------------------------------------------------------- /login/img_avatar2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/login/img_avatar2.png -------------------------------------------------------------------------------- /login/img_avatar4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/login/img_avatar4.png -------------------------------------------------------------------------------- /screenShots/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/screenShots/Thumbs.db -------------------------------------------------------------------------------- /screenShots/like.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/screenShots/like.PNG -------------------------------------------------------------------------------- /assets/images/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/images/Thumbs.db -------------------------------------------------------------------------------- /screenShots/LogOut.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/screenShots/LogOut.PNG -------------------------------------------------------------------------------- /screenShots/dislike.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/screenShots/dislike.PNG -------------------------------------------------------------------------------- /signOut.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/channelImages/.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/channelImages/.png -------------------------------------------------------------------------------- /screenShots/ProfilePic.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/screenShots/ProfilePic.PNG -------------------------------------------------------------------------------- /assets/channelImages/235.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/channelImages/235.png -------------------------------------------------------------------------------- /assets/channelImages/236.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/channelImages/236.png -------------------------------------------------------------------------------- /assets/channelImages/237.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/channelImages/237.png -------------------------------------------------------------------------------- /assets/channelImages/238.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/channelImages/238.png -------------------------------------------------------------------------------- /assets/channelImages/246.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/channelImages/246.png -------------------------------------------------------------------------------- /assets/channelImages/251.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/channelImages/251.png -------------------------------------------------------------------------------- /assets/upload/health_id.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/upload/health_id.pdf -------------------------------------------------------------------------------- /assets/channelImages/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/channelImages/Thumbs.db -------------------------------------------------------------------------------- /screenShots/createChannel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/screenShots/createChannel.png -------------------------------------------------------------------------------- /screenShots/postingOptions.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/screenShots/postingOptions.PNG -------------------------------------------------------------------------------- /assets/screenShots/Newchannel.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/screenShots/Newchannel.PNG -------------------------------------------------------------------------------- /screenShots/createNewChannel.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/screenShots/createNewChannel.PNG -------------------------------------------------------------------------------- /screenShots/userProfileSearch.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/screenShots/userProfileSearch.PNG -------------------------------------------------------------------------------- /assets/helpPageScreenShots/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/helpPageScreenShots/Thumbs.db -------------------------------------------------------------------------------- /assets/helpPageScreenShots/like.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/helpPageScreenShots/like.PNG -------------------------------------------------------------------------------- /assets/helpPageScreenShots/post.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/helpPageScreenShots/post.PNG -------------------------------------------------------------------------------- /assets/helpPageScreenShots/react.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/helpPageScreenShots/react.PNG -------------------------------------------------------------------------------- /assets/helpPageScreenShots/reply.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/helpPageScreenShots/reply.PNG -------------------------------------------------------------------------------- /screenShots/listOfChannelMembers.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/screenShots/listOfChannelMembers.PNG -------------------------------------------------------------------------------- /assets/helpPageScreenShots/Signup.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/helpPageScreenShots/Signup.PNG -------------------------------------------------------------------------------- /assets/helpPageScreenShots/archive.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/helpPageScreenShots/archive.PNG -------------------------------------------------------------------------------- /assets/helpPageScreenShots/dislike.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/helpPageScreenShots/dislike.PNG -------------------------------------------------------------------------------- /assets/helpPageScreenShots/logout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/helpPageScreenShots/logout.png -------------------------------------------------------------------------------- /assets/helpPageScreenShots/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/helpPageScreenShots/search.png -------------------------------------------------------------------------------- /screenShots/InviteMembersToChannel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/screenShots/InviteMembersToChannel.png -------------------------------------------------------------------------------- /assets/helpPageScreenShots/ProfilePic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/helpPageScreenShots/ProfilePic.png -------------------------------------------------------------------------------- /assets/images/coniglio_rabbit_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/images/coniglio_rabbit_small.png -------------------------------------------------------------------------------- /assets/screenShots/demoscriptTesting.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/screenShots/demoscriptTesting.PNG -------------------------------------------------------------------------------- /assets/screenShots/existingChannels.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/screenShots/existingChannels.PNG -------------------------------------------------------------------------------- /assets/screenShots/noPrivateChannel.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/screenShots/noPrivateChannel.PNG -------------------------------------------------------------------------------- /assets/helpPageScreenShots/createNewChanne.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/helpPageScreenShots/createNewChanne.png -------------------------------------------------------------------------------- /assets/helpPageScreenShots/create_channel.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/helpPageScreenShots/create_channel.PNG -------------------------------------------------------------------------------- /assets/helpPageScreenShots/postingOptions.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/helpPageScreenShots/postingOptions.PNG -------------------------------------------------------------------------------- /assets/helpPageScreenShots/userProfileSearch.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/helpPageScreenShots/userProfileSearch.PNG -------------------------------------------------------------------------------- /assets/helpPageScreenShots/listOfChannelMembers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/helpPageScreenShots/listOfChannelMembers.png -------------------------------------------------------------------------------- /assets/helpPageScreenShots/InviteMembersToChannel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/helpPageScreenShots/InviteMembersToChannel.png -------------------------------------------------------------------------------- /assets/screenShots/inviteUsesto Existing Channel.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/screenShots/inviteUsesto Existing Channel.PNG -------------------------------------------------------------------------------- /assets/screenShots/codeForInsertingNotExisting User.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/screenShots/codeForInsertingNotExisting User.PNG -------------------------------------------------------------------------------- /login/connect.php: -------------------------------------------------------------------------------- 1 | 2 | 8 | -------------------------------------------------------------------------------- /assets/helpPageScreenShots/InviteUserWhileCreatingChannel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chandu-muthyala/Chat-Room-Application-PHP-idYeah/master/assets/helpPageScreenShots/InviteUserWhileCreatingChannel.png -------------------------------------------------------------------------------- /uploadImage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | Select image to upload: 7 | 8 | 9 |
10 | 11 | 12 | -------------------------------------------------------------------------------- /login/login.css: -------------------------------------------------------------------------------- 1 | .container1{ 2 | width: 30%; 3 | /*height: 30%;*/ 4 | border: 3px solid #73AD21; 5 | padding: 1%; 6 | margin:0 auto; 7 | margin-top: 5%; 8 | text-align: center; 9 | /*border-radius: 25px;*/ 10 | 11 | } 12 | .loginform{ 13 | padding: 10%; 14 | border: 3px solid #f1f1f1; 15 | border-radius: 25px; 16 | } 17 | .inputfield{ 18 | width: 100%; 19 | padding: .5em 1em; 20 | border-radius: 5px; 21 | } 22 | .label1{ 23 | font-size: 100%; 24 | color:black; 25 | } 26 | .btn1{ 27 | font-size:0.875em; 28 | margin:0.35em; 29 | border-radius: 25px; 30 | background-color: #4CAF50; 31 | color: white; 32 | padding: .5em .5em; 33 | border: none; 34 | cursor: pointer; 35 | width: 25%; 36 | } 37 | .btn1:hover { 38 | opacity: 0.8; 39 | } 40 | .imgcontainer { 41 | text-align: center; 42 | margin: 24px 0 1px 0; 43 | } 44 | h3{ 45 | margin-top: 5px; 46 | } 47 | img.avatar { 48 | width: 20%; 49 | border-radius: 50%; 50 | } -------------------------------------------------------------------------------- /search.php: -------------------------------------------------------------------------------- 1 | connect_error) { 7 | die("Connection failed: " . $conn->connect_error); 8 | } 9 | $key=$_GET['key']; 10 | $array = array(); 11 | $query="SELECT email FROM `users` where email LIKE '%{$key}%'"; 12 | $checkResult = mysqli_query($conn,$query); 13 | while($row=mysqli_fetch_assoc($checkResult)) 14 | { 15 | $array[] = $row['email']; 16 | } 17 | echo json_encode($array); 18 | 19 | ?> 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 37 | -------------------------------------------------------------------------------- /messages/messages.css: -------------------------------------------------------------------------------- 1 | .right { 2 | margin-left: 0px; 3 | padding: 5px 5px; 4 | background-color: white; 5 | border-bottom: 2px solid #ccc; 6 | } 7 | .thread{ 8 | margin-left: 4%; 9 | padding: 5px 5px; 10 | background-color: white; 11 | /*border-radius: 10px;*/ 12 | /*border: 1px solid #ccc;*/ 13 | } 14 | 15 | .timeStamp{ 16 | margin-left: 8px !important; 17 | opacity: 0.6 !important; 18 | font-size: 1.2vh; 19 | } 20 | .contact_Img{ 21 | width: 40px; 22 | height: 40px; 23 | margin-right: 15px; 24 | border-radius: 15%; 25 | border: 1px solid#ddd; 26 | 27 | } 28 | .replyMsgContactImg{ 29 | width: 40px; 30 | height: 40px; 31 | /*border-radius: 15%;*/ 32 | border: 1px solid#ddd; 33 | float:left; 34 | } 35 | .textMessage{ 36 | margin-left: 55px; 37 | font-family: "Comic Sans MS", cursive, sans-serif; 38 | word-wrap: break-word; 39 | } 40 | .logout{ 41 | float: right; 42 | margin-right: -13%; 43 | margin-top: 1.7em; 44 | } 45 | .delete{ 46 | font-size: 150% !important; 47 | cursor: pointer; 48 | padding-left: 50%; 49 | } 50 | .delete:hover{ 51 | font-size: 150% !important; 52 | cursor: pointer; 53 | color: red; 54 | padding-left: 50%; 55 | } -------------------------------------------------------------------------------- /signup/signUpPage.css: -------------------------------------------------------------------------------- 1 | .formDiv{ 2 | width: 50%; 3 | margin-left: auto; 4 | margin-right: auto; 5 | margin-top: 5%; 6 | /*box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);*/ 7 | box-shadow: 0px 0px 5px 1px lightgrey; 8 | border-radius: 5px; 9 | } 10 | h2{ 11 | text-align: center; 12 | padding: 2%; 13 | } 14 | /* Full-width input fields */ 15 | .inputfield{ 16 | width: 100%; 17 | padding: 12px 20px; 18 | margin: 8px 0; 19 | display: inline-block; 20 | border: 1px solid #ccc; 21 | box-sizing: border-box; 22 | border-radius: .5em; 23 | } 24 | .error {color: #FF0000;} 25 | /* Set a style for all buttons */ 26 | button { 27 | background-color: #4CAF50; 28 | color: white; 29 | padding: 14px 20px; 30 | margin: 8px 0; 31 | border: none; 32 | cursor: pointer; 33 | width: 100%; 34 | } 35 | 36 | /* Extra styles for the cancel button */ 37 | .cancelbtn { 38 | padding: 14px 20px; 39 | background-color: #f44336; 40 | } 41 | 42 | /* Float cancel and signup buttons and add an equal width */ 43 | .signupbtn { 44 | float: left; 45 | 46 | } 47 | 48 | /* Add padding to container elements */ 49 | .container { 50 | padding: 16px; 51 | } 52 | 53 | /* Clear floats */ 54 | .clearfix::after { 55 | content: ""; 56 | clear: both; 57 | display: table; 58 | } 59 | 60 | /* Change styles for cancel button and signup button on extra small screens */ 61 | @media screen and (max-width: 300px) { 62 | .signupbtn { 63 | width: 100%; 64 | } 65 | } -------------------------------------------------------------------------------- /inviteMembers.php: -------------------------------------------------------------------------------- 1 | connect_error) { 12 | die("Connection failed: " . $conn->connect_error); 13 | } 14 | $data = $_POST['data']; 15 | $channelId = mysqli_real_escape_string($conn,$data['channelId']); 16 | 17 | $userList = $data['usersList']; 18 | array_push($userList,$_SESSION['email']); 19 | $userList = array_unique($userList); 20 | 21 | foreach ($userList as $user) { 22 | $checkSql = "SELECT count(*)as count1 FROM `userChannels` where channel_id='$channelId' and user_email='$user'"; 23 | $checkResult = mysqli_query($conn,$checkSql); 24 | $checkCount = mysqli_fetch_assoc($checkResult); 25 | $count = $checkCount['count1']; 26 | echo "invite '$count'"; 27 | if($count<1) 28 | { 29 | $sql = "INSERT INTO `userChannels` VALUES('$user','$channelId',CURRENT_TIMESTAMP,DEFAULT)"; 30 | if (mysqli_query($conn, $sql)) { 31 | 32 | echo "**** $user userChannels created successfully ***"; 33 | }else{ 34 | // echo "

**** failed creating channel***

"; 35 | echo "**** failed creating userChannels***"; 36 | echo $sql; 37 | } 38 | } 39 | else{ 40 | echo "'$user' already exist."; 41 | } 42 | } 43 | ?> -------------------------------------------------------------------------------- /login/securityCheck.php: -------------------------------------------------------------------------------- 1 | 2 | connect_error) { 9 | die("Connection failed: " . $conn->connect_error); 10 | } 11 | if(isset($_POST['passCode'])){ 12 | $passCode = mysqli_real_escape_string($conn,$_POST['passCode']); 13 | if($passCode==$_SESSION['Passcode']){ 14 | echo "inside if"; 15 | header("location: ../index.php"); 16 | }else{ 17 | $error='* Wrong passCode, retry'; 18 | } 19 | } 20 | 21 | 22 | 23 | ?> 24 | 25 | 26 | 27 | Security Check 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |
38 |

Enter Secure Passcode

39 |

40 |
41 |
42 | 43 | 44 |
45 |
46 |
47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /profilePage.css: -------------------------------------------------------------------------------- 1 | .profileStyle{ 2 | color:black; 3 | 4 | } 5 | .formDiv{ 6 | width: 50%; 7 | margin-left: auto; 8 | margin-right: auto; 9 | margin-top: 5%; 10 | /*box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);*/ 11 | box-shadow: 0px 0px 5px 1px lightgrey; 12 | border-radius: 5px; 13 | } 14 | h2{ 15 | text-align: center; 16 | padding: 2%; 17 | border-bottom: 3px solid #ededed; 18 | } 19 | .arrowLeft{ 20 | font-size: 230% !important; 21 | margin-left: 2%; 22 | cursor: pointer; 23 | } 24 | .noUser{ 25 | margin-top: 21%; 26 | margin-left: 32%; 27 | opacity: 0.5; 28 | font-size: 250%; 29 | 30 | } 31 | /* Add padding to container elements */ 32 | .container { 33 | padding: 16px; 34 | min-height: 500px 35 | } 36 | .channels{ 37 | margin-top: 10%; 38 | } 39 | /* Clear floats */ 40 | .clearfix::after { 41 | content: ""; 42 | clear: both; 43 | display: table; 44 | } 45 | 46 | /* Change styles for cancel button and signup button on extra small screens */ 47 | @media screen and (max-width: 300px) { 48 | .signupbtn { 49 | width: 100%; 50 | } 51 | } 52 | /*star rating*/ 53 | .ratings { 54 | position: relative; 55 | vertical-align: middle; 56 | display: inline-block; 57 | color: #b1b1b1; 58 | overflow: hidden; 59 | } 60 | .full-stars { 61 | position: absolute; 62 | left: 0; 63 | top: 0; 64 | white-space: nowrap; 65 | overflow: hidden; 66 | color: #fde16d; 67 | } 68 | .empty-stars:before, .full-stars:before { 69 | content:"\2605\2605\2605\2605\2605"; 70 | font-size: 14pt; 71 | } 72 | .empty-stars:before { 73 | -webkit-text-stroke: 1px #848484; 74 | } 75 | .full-stars:before { 76 | -webkit-text-stroke: 1px orange; 77 | } 78 | /* Webkit-text-stroke is not supported on firefox or IE */ 79 | 80 | /* Firefox */ 81 | @-moz-document url-prefix() { 82 | .full-stars { 83 | color: #ECBE24; 84 | } 85 | } 86 | /* IE */ 87 | -------------------------------------------------------------------------------- /uploadImage.php: -------------------------------------------------------------------------------- 1 | connect_error) { 8 | die("Connection failed: " . $conn->connect_error); 9 | } 10 | $channel = htmlspecialchars($_POST['channel']); 11 | echo $channel; 12 | $target_dir = "./assets/images/"; 13 | $target_file = $target_dir .$_SESSION['email'].'.png'; 14 | echo"file name:". $target_file; 15 | $uploadOk = 1; 16 | $imageFileType = pathinfo($target_file,PATHINFO_EXTENSION); 17 | // Check if image file is a actual image or fake image 18 | if(isset($_POST["submit"])) { 19 | $check = getimagesize($_FILES["fileToUpload"]["tmp_name"]); 20 | if($check !== false) { 21 | echo "File is an image - " . $check["mime"] . "."; 22 | $uploadOk = 1; 23 | } else { 24 | echo "File is not an image."; 25 | $uploadOk = 0; 26 | } 27 | } 28 | 29 | // Check file size 30 | if ($_FILES["fileToUpload"]["size"] > 500000) { 31 | echo "Sorry, your file is too large."; 32 | $uploadOk = 0; 33 | } 34 | // Allow certain file formats 35 | if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" 36 | && $imageFileType != "gif" ) { 37 | echo "Sorry, only JPG, JPEG, PNG & GIF files are allowed."; 38 | $uploadOk = 0; 39 | } 40 | // Check if $uploadOk is set to 0 by an error 41 | if ($uploadOk == 0) { 42 | echo "Sorry, your file was not uploaded."; 43 | // if everything is ok, try to upload file 44 | } else { 45 | if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) { 46 | $sql = "UPDATE users SET display_pic=1 where email ='".$_SESSION['email']."'"; 47 | if (mysqli_query($conn, $sql)) { 48 | 49 | echo "error updating into user table"; 50 | }else{ 51 | echo "Error: " . $sql . "
" . mysqli_error($conn); 52 | } 53 | //echo "The file ". basename( $_FILES["fileToUpload"]["name"]). " has been uploaded."; 54 | header('location: '.$_SESSION['url']); 55 | } else { 56 | echo "Sorry, there was an error uploading your file."; 57 | } 58 | } 59 | ?> 60 | -------------------------------------------------------------------------------- /upLoadDocument.php: -------------------------------------------------------------------------------- 1 | connect_error) { 8 | die("Connection failed: " . $conn->connect_error); 9 | } 10 | 11 | if (isset($_POST['submit'])) 12 | { 13 | $channelId = mysqli_real_escape_string($conn,$_POST['channel']); 14 | $user = mysqli_real_escape_string($conn,$_POST['email']); 15 | $toEmail = mysqli_real_escape_string($conn,$_POST['toEmail']); 16 | $fromEmail = mysqli_real_escape_string($conn,$_POST['fromEmail']); 17 | $target = "./assets/upload/"; 18 | $fileName = basename($_FILES['uploaded']['name']); 19 | 20 | $textOrCode=4; 21 | 22 | 23 | $imageFormats = ['png','jpeg','jpg','gif','tiff','tif']; 24 | $imgType = end(explode('.',$fileName)); 25 | if(!in_array($imgType,$imageFormats)){ 26 | if(isset($_POST['toEmail'])){ 27 | $sql = "INSERT INTO `direct_message` VALUES(DEFAULT,'$fromEmail','$toEmail','$fileName','$textOrCode',CURRENT_TIMESTAMP)"; 28 | }else{ 29 | $sql = "INSERT INTO `channel_messages` VALUES(DEFAULT,'$channelId','$user','$fileName',DEFAULT,'$textOrCode',CURRENT_TIMESTAMP)"; 30 | } 31 | if (mysqli_query($conn, $sql)) { 32 | if(isset($_POST['toEmail'])){ 33 | $lastIdQuery = "SELECT * FROM `direct_message` ORDER BY `direct_message`.`directmsg_id` DESC LIMIT 1"; 34 | $lastIdResult = mysqli_query($conn,$lastIdQuery); 35 | $lastId = mysqli_fetch_assoc($lastIdResult); 36 | $lastId =$lastId['directmsg_id']; 37 | }else{ 38 | $lastIdQuery = "SELECT * FROM `channel_messages` ORDER BY `channel_messages`.`cmessage_id` DESC LIMIT 1"; 39 | $lastIdResult = mysqli_query($conn,$lastIdQuery); 40 | $lastId = mysqli_fetch_assoc($lastIdResult); 41 | $lastId =$lastId['cmessage_id']; 42 | } 43 | }else{ 44 | echo "Error: " . $sql . "
" . mysqli_error($conn); 45 | } 46 | 47 | $ok = 1; 48 | $target = $target .$lastId."_".basename($_FILES['uploaded']['name']); 49 | if (move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) 50 | { 51 | echo "target:".$target; 52 | echo "The file " . basename($_FILES['uploaded']['name']) . " has been uploaded"; 53 | header('location: '.$_SESSION['url']); 54 | } 55 | else 56 | { 57 | echo "Sorry, there was a problem uploading your file."; 58 | } 59 | }else{ 60 | echo "This is not a document."; 61 | } 62 | 63 | } 64 | 65 | ?> -------------------------------------------------------------------------------- /userProfile.php: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |

Profile Page

20 | 21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | 29 | Avatar 30 | 31 |
32 | 33 | 38 |
39 |
40 |
41 | 42 |
43 |
44 | 45 |
46 | 47 | 48 | -------------------------------------------------------------------------------- /createChannel.php: -------------------------------------------------------------------------------- 1 | connect_error) { 11 | die("Connection failed: " . $conn->connect_error); 12 | } 13 | $data = $_POST['data']; 14 | 15 | $channelName = mysqli_real_escape_string($conn,$data['channelName']); 16 | $purpose = mysqli_real_escape_string($conn,$data['purpose']); 17 | $radioButtonValue = mysqli_real_escape_string($conn,$data['radioButtonValue']); 18 | $userList = $data['usersList']; 19 | array_push($userList,$_SESSION['email']); 20 | $userList = array_unique($userList); 21 | $userCreated = $_SESSION['email']; 22 | $checkChannelSql = " SELECT channel_name from channels;"; 23 | $checkChannelResult = mysqli_query($conn, $checkChannelSql); 24 | $array =[]; 25 | // $checkChannelRow = $checkChannelResult->fetch_assoc(); 26 | while(($checkChannelRow = mysqli_fetch_assoc($checkChannelResult))) 27 | { 28 | array_push($array,$checkChannelRow['channel_name']); 29 | 30 | } 31 | if(in_array($channelName , $array)) { 32 | echo "channel already exist use different name"; 33 | }else{ 34 | $sql = "INSERT INTO `channels` VALUES(DEFAULT,'$channelName','$purpose','$userCreated',CURRENT_TIMESTAMP,'$radioButtonValue',DEFAULT)"; 35 | // $result = $conn->query($sql); 36 | if (mysqli_query($conn, $sql)) { 37 | // echo "

**** Channel created successfully ***

"; 38 | echo "**** Channel created successfully ***"; 39 | }else{ 40 | // echo "

**** failed creating channel***

"; 41 | echo "**** failed creating channel***"; 42 | } 43 | $sql = "SELECT MAX(channel_id) as last_id FROM `channels`"; 44 | $result = mysqli_query($conn, $sql); 45 | $row = $result->fetch_assoc(); 46 | $last_id = $row['last_id']; 47 | echo $last_id; 48 | foreach ($userList as $user) { 49 | 50 | $sql = "INSERT INTO `userChannels` VALUES('$user','$last_id',CURRENT_TIMESTAMP,DEFAULT)"; 51 | if (mysqli_query($conn, $sql)) { 52 | 53 | echo "**** $user userChannels created successfully ***"; 54 | }else{ 55 | // echo "

**** failed creating channel***

"; 56 | echo "**** failed creating userChannels***"; 57 | } 58 | 59 | } 60 | } 61 | 62 | mysqli_close($conn); 63 | 64 | ?> -------------------------------------------------------------------------------- /login/login.php: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | idYeah! Login Page 11 | 12 | 13 | 14 | 15 | 20 | 21 | 22 |
23 |
24 | Avatar 25 |
26 |

idYeah! Login Page

27 |
28 |
29 |

30 | 31 | 32 |
33 | 34 | 35 |

36 | 37 |
38 |
39 | 40 | 46 |
47 | 48 |
49 |
50 | Create New Account 51 |
52 | 53 |
54 |
55 | 56 | 57 | -------------------------------------------------------------------------------- /logInAcitvity.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Testing Pie Chart 6 | 7 | 13 | 14 | 15 | 61 | 62 | -------------------------------------------------------------------------------- /uploadImageInToChannel.php: -------------------------------------------------------------------------------- 1 | connect_error) { 15 | die("Connection failed: " . $conn->connect_error); 16 | } 17 | $channelId = mysqli_real_escape_string($conn,$_POST['channel']); 18 | $message = mysqli_real_escape_string($conn,$_POST['message']); 19 | $toEmail = mysqli_real_escape_string($conn,$_POST['toEmail']); 20 | $fromEmail = mysqli_real_escape_string($conn,$_POST['fromEmail']); 21 | echo $channelId; 22 | $user = $_SESSION['email']; 23 | if(isset($_POST['toEmail'])){ 24 | $sql = "INSERT INTO `direct_message` VALUES(DEFAULT,'$fromEmail','$toEmail','$message','3',CURRENT_TIMESTAMP)"; 25 | }else{ 26 | $sql = "INSERT INTO `channel_messages` VALUES(DEFAULT,'$channelId','$user','$message',DEFAULT,'3',CURRENT_TIMESTAMP)"; 27 | } 28 | if (mysqli_query($conn, $sql)) { 29 | 30 | // header('Location: ../index.php?channel='.$channel_id.'#scrollBottom'); 31 | // exit; 32 | }else{ 33 | echo "Error: " . $sql . "
" . mysqli_error($conn); 34 | } 35 | if(isset($_POST['toEmail'])){ 36 | $lastIdQuery = "SELECT * FROM `direct_message` ORDER BY `direct_message`.`directmsg_id` DESC LIMIT 1"; 37 | $lastIdResult = mysqli_query($conn,$lastIdQuery); 38 | $lastId = mysqli_fetch_assoc($lastIdResult); 39 | $lastId =$lastId['directmsg_id']; 40 | }else{ 41 | $lastIdQuery = "SELECT * FROM `channel_messages` ORDER BY `channel_messages`.`cmessage_id` DESC LIMIT 1"; 42 | $lastIdResult = mysqli_query($conn,$lastIdQuery); 43 | $lastId = mysqli_fetch_assoc($lastIdResult); 44 | $lastId =$lastId['cmessage_id']; 45 | } 46 | 47 | 48 | $target_file = $target_dir .$lastId.'.png'; 49 | $uploadOk = 1; 50 | $imageFileType = pathinfo($target_file,PATHINFO_EXTENSION); 51 | // Check if image file is a actual image or fake image 52 | if(isset($_POST["submit"])) { 53 | $check = getimagesize($_FILES["fileToUpload"]["tmp_name"]); 54 | if($check !== false) { 55 | echo "File is an image - " . $check["mime"] . "."; 56 | $uploadOk = 1; 57 | } else { 58 | echo "File is not an image."; 59 | $uploadOk = 0; 60 | 61 | } 62 | } 63 | 64 | // // Check file size 65 | // if ($_FILES["fileToUpload"]["size"] > 1000000) { 66 | // echo "Sorry, your file is too large."; 67 | // $uploadOk = 0; 68 | 69 | // } 70 | // Allow certain file formats 71 | if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" 72 | && $imageFileType != "gif" ) { 73 | echo "Sorry, only JPG, JPEG, PNG & GIF files are allowed."; 74 | $uploadOk = 0; 75 | } 76 | // Check if $uploadOk is set to 0 by an error 77 | if ($uploadOk == 0) { 78 | echo "Sorry, your file was not uploaded."; 79 | if(isset($_POST['toEmail'])){ 80 | $deleteImg = "DELETE FROM direct_message where directmsg_id='$lastId'"; 81 | }else{ 82 | $deleteImg = "DELETE FROM channel_messages where cmessage_id='$lastId'"; 83 | } 84 | 85 | mysqli_query($conn,$deleteImg); 86 | 87 | // if everything is ok, try to upload file 88 | } else { 89 | if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) { 90 | echo "The file ". basename( $_FILES["fileToUpload"]["name"]). " has been uploaded."; 91 | header('location: '.$_SESSION['url']); 92 | } else { 93 | 94 | echo "Sorry, there was an error uploading your file."; 95 | } 96 | } 97 | ?> -------------------------------------------------------------------------------- /inviteMembersToChannel.php: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Invite members to Channel 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 |

Invite members to Channel

44 |
45 |
46 |
47 |
48 | 52 |

53 |
54 | 55 | 56 | 57 |
58 | 59 |
60 | 61 | 62 | 70 |
71 |
72 |
73 | 74 | -------------------------------------------------------------------------------- /login/validate.php: -------------------------------------------------------------------------------- 1 | connect_error) { 9 | die("Connection failed: " . $conn->connect_error); 10 | } 11 | function check_login($u,$p){ 12 | global $conn; 13 | $sql = "SELECT * FROM users where email= '".$u."'"; 14 | $result = $conn->query($sql); 15 | $row = $result->fetch_assoc(); 16 | return($row['email']==$u && $row['password']==$p); 17 | } 18 | function generateTempPassword(){ 19 | $alphabet = "abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789"; 20 | $pass = array(); //remember to declare $pass as an array 21 | $alphaLength = strlen($alphabet) - 1; //put the length -1 in cache 22 | for ($i = 0; $i < 6; $i++) { 23 | $n = rand(0, $alphaLength); 24 | $pass[] = $alphabet[$n]; 25 | } 26 | return implode($pass); //turn the array into a string 27 | } 28 | function sendMailForNewUser($email,$passCode){ 29 | $return_arrfinal = array(); 30 | $status_array['status'] = '1'; 31 | $mail = new PHPMailer(); 32 | $toarraymail="$email"; 33 | $mail->SMTPDebug = 1; // Enable verbose debug output 34 | $mail->Port = '587'; 35 | $mail->isSMTP(); // Set mailer to use SMTP // Specify main and backup SMTP servers // Set mailer to use SMTP 36 | $mail->Host = gethostbyname('smtp.gmail.com'); // Specify main and backup SMTP servers 37 | $mail->SMTPAuth = true; // Authentication must be disabled 38 | 39 | $mail->Username = 'mchandrasekharreddym@gmail.com'; 40 | $mail->Password = ''; 41 | $mail->SMTPSecure= 'tls'; 42 | 43 | 44 | $mail->setFrom("mchandrasekharreddym@gmail.com","idYeah!"); 45 | $mail->AddAddress($toarraymail); // Add a recipient 46 | // Optional name 47 | $mail->isHTML(true); // Set email format to HTML 48 | 49 | $mail->Subject = ' Secure passCode '; 50 | $mail->Body =" Hi,
Email: $email
Pass Code: $passCode
"; 51 | $mail->AltBody = 'This is the body in plain text for non-HTML mail clients'; 52 | 53 | if(!$mail->Send()){ 54 | echo "false"; 55 | echo 'Mailer Error: ' . $mail->ErrorInfo; 56 | return false; 57 | }else{ 58 | echo "Sending email"; 59 | return true; 60 | } 61 | echo "Sending email"; 62 | 63 | } 64 | $email = htmlspecialchars($_POST['email']); 65 | $password = htmlspecialchars($_POST['password']); 66 | if($_POST && check_login($email,$password)){ 67 | $_SESSION['email'] = $email; 68 | $_SESSION['loggedIn'] = True; 69 | $logInAcitvitySql = "INSERT INTO `loginActivityLog` VALUES(DEFAULT,'$email',CURRENT_TIMESTAMP)"; 70 | $result = $conn->query($logInAcitvitySql); 71 | $secureOptionSql = "SELECT isSecure FROM users where email='$email'"; 72 | $secureOptionResult = $conn->query($secureOptionSql); 73 | $row = $secureOptionResult->fetch_assoc(); 74 | if($row['isSecure']==1){ 75 | $passCode = generateTempPassword(); 76 | $_SESSION['Passcode'] = $passCode; 77 | sendMailForNewUser($email,$passCode); 78 | header("location: ./securityCheck.php"); 79 | }else{ 80 | header("location: ../index.php"); 81 | } 82 | 83 | exit(); 84 | session_write_close(); 85 | }elseif($_POST) { 86 | $Err= "*** Entered email / password is incorrect ***"; 87 | 88 | }else { 89 | $Err= "**** You're not logged in ***"; 90 | 91 | } 92 | 93 | ?> 94 | 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /login/gitLogin.php: -------------------------------------------------------------------------------- 1 | connect_error) { 7 | die("Connection failed: " . $conn->connect_error); 8 | } 9 | //qav2 10 | // define('clientID', 'c4e99274015ff24bfc56'); 11 | // define('clientSecret', 'f58c2400067713fff734eb001595445823e9f9e4'); 12 | //define('appName', 'idYeah!'); 13 | 14 | // docker 15 | define('clientID', '402caad5d00ff3bead83'); 16 | define('clientSecret', '14a76d915f85136faf09e3381cfdecb6fdfd6b19'); 17 | define('appName', 'idYeah!_docker'); 18 | 19 | $url = 'https://github.com/login/oauth/access_token'; 20 | 21 | $fields = array( 22 | 'client_id' => urlencode(clientID), 23 | 'client_secret' => urlencode(clientSecret), 24 | 'code' => urlencode($_GET['code']) 25 | ); 26 | 27 | //url-ify the data for the POST 28 | foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; } 29 | rtrim($fields_string, '&'); 30 | 31 | $ch = curl_init(); 32 | 33 | //set the url, number of POST vars, POST data 34 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 35 | curl_setopt($ch,CURLOPT_URL, $url); 36 | curl_setopt($ch,CURLOPT_POST, count($fields)); 37 | curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/json')); 38 | curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string); 39 | 40 | //execute post 41 | // echo curl_exec($ch); 42 | $result = json_decode(curl_exec($ch),TRUE); 43 | echo $result["access_token"].'
'; 44 | //close connection 45 | curl_close($ch); 46 | 47 | $ch = curl_init(); 48 | curl_setopt($ch,CURLOPT_URL,"https://api.github.com/user?access_token=".$result["access_token"]); 49 | curl_setopt($ch,CURLOPT_RETURNTRANSFER,true); 50 | curl_setopt($ch,CURLOPT_USERAGENT,'http://developer.github.com/v3/#user-agent-required'); 51 | curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept: application/json')); 52 | 53 | $output=json_decode(curl_exec($ch),TRUE); 54 | curl_close($ch); 55 | //echo json_encode($output); 56 | // echo "Login: ".$output["login"].'
'; 57 | // echo $output["avatar_url"].'
'; 58 | // echo $output["name"].'
'; 59 | // echo "email: ".$output["email"]; 60 | $gitEmail = $output["email"]; 61 | $gitUserName = $output["login"]; 62 | $gitImage = $output["avatar_url"]; 63 | 64 | function checkLogin($gitUserName){ 65 | global $conn; 66 | echo "check login function"; 67 | $sql = "SELECT * FROM users where email= '$gitUserName'"; 68 | $result = mysqli_query($conn,$sql); 69 | if($result->num_rows > 0 ){ 70 | return false; 71 | }else{ 72 | return true; 73 | } 74 | } 75 | if(checkLogin($gitUserName)){ 76 | $sql = "INSERT INTO `users` VALUES('$gitUserName','$gitUserName','$gitUserName',DEFAULT,DEFAULT,2,DEFAULT,'DEFAULT',DEFAULT,DEFAULT,CURRENT_TIMESTAMP)"; 77 | 78 | if (mysqli_query($conn, $sql)) { 79 | $sql1 = "INSERT INTO `userChannels` VALUES('$gitUserName',1,CURRENT_TIMESTAMP,DEFAULT)"; 80 | $sql2 = "INSERT INTO `userChannels` VALUES('$gitUserName',2,CURRENT_TIMESTAMP,DEFAULT)"; 81 | $sql3 = "INSERT INTO `gitUser` VALUES(DEFAULT,'$gitUserName','$gitImage',CURRENT_TIMESTAMP)"; 82 | $sqlResult1 = mysqli_query($conn, $sql1); 83 | $sqlResult2 = mysqli_query($conn, $sql2); 84 | $sqlResult3 = mysqli_query($conn, $sql3); 85 | $logInAcitvitySql = "INSERT INTO `loginActivityLog` VALUES(DEFAULT,'$email',CURRENT_TIMESTAMP)"; 86 | $result = $conn->query($logInAcitvitySql); 87 | header("location: ../index.php"); 88 | } 89 | }else{ 90 | $logInAcitvitySql = "INSERT INTO `loginActivityLog` VALUES(DEFAULT,'$gitUserName',CURRENT_TIMESTAMP)"; 91 | $result = $conn->query($logInAcitvitySql); 92 | header("location: ../index.php"); 93 | } 94 | $_SESSION['email'] = $gitUserName; 95 | $_SESSION['loggedIn'] = True; 96 | ?> 97 | -------------------------------------------------------------------------------- /profilePage.php: -------------------------------------------------------------------------------- 1 | connect_error) { 12 | die("Connection failed: " . $conn->connect_error); 13 | } 14 | include_once "sqlQueries.php"; 15 | $image_url = getImage($_GET['email']); 16 | $result = getUserDetails(mysqli_real_escape_string($conn,$_GET['email'])); 17 | $count = existOrNot(mysqli_real_escape_string($conn,$_GET['email'])); 18 | // echo $count; 19 | $userName = $result['display_name']; 20 | $result = getUserDetails(mysqli_real_escape_string($conn,$_GET['email'])); 21 | $email = $result['email']; 22 | $result = getUserDetails(mysqli_real_escape_string($conn,$_GET['email'])); 23 | $status = $result['status']; 24 | $publicChannels =getAllPublicChannels(mysqli_real_escape_string($conn,$_GET['email'])); 25 | $rating = userProfileRating(mysqli_real_escape_string($conn,$_GET['email'])); 26 | $profile = " 27 | 28 | 29 | ProfileView 30 | 31 | 32 | 33 | 34 | 35 | 36 | "; 37 | 38 | 39 | if($_GET['email'] && $count){ 40 | //echo "string"; 41 | // header('location: userProfile.php?email='.$_SESSION['email'];); 42 | //header('location: userProfile.php?email='.$_SESSION['email']); 43 | 44 | $profile = $profile. " 45 |
46 |
47 | 48 |

Profile Page

49 |
50 |
51 |
52 | $userName
53 | $email
54 | $status
55 |
56 |
57 | $rating 58 |
59 |
60 | 61 |
62 | 63 | Avatar 64 |
65 | 66 | $publicChannels 67 |
68 |
69 |
70 |
71 |
72 | 73 |
74 | 75 | 76 | "; 77 | echo $profile; 78 | } 79 | else{ 80 | $profile = $profile. " 81 |
82 |
84 | 85 | 86 | "; 87 | echo $profile; 88 | } 89 | ?> 90 | -------------------------------------------------------------------------------- /messages/messages.php: -------------------------------------------------------------------------------- 1 | connect_error) { 11 | die("Connection failed: " . $conn->connect_error); 12 | } 13 | 14 | $message = mysqli_real_escape_string($conn,$_POST['message']); 15 | $channel_id = mysqli_real_escape_string($conn,$_POST['channel']); 16 | $textOrCode = mysqli_real_escape_string($conn,$_POST['text']); 17 | $user = getUserDetails(mysqli_real_escape_string($conn,$_POST['email'])); 18 | $toEmail = getUserDetails(mysqli_real_escape_string($conn,$_POST['toEmail'])); 19 | $fromEmail = getUserDetails(mysqli_real_escape_string($conn,$_POST['fromEmail'])); 20 | $toEmail =$toEmail['email']; 21 | $fromEmail = $fromEmail['email']; 22 | $user = $user['email']; 23 | $imageFormats = ['png','jpeg','jpg','gif','tiff','tif']; 24 | $image = end(explode('.',$message)); 25 | 26 | $type = get_headers($message, 1)["Content-Type"]; 27 | $imgType=explode("/",$type)[1]; 28 | 29 | if(isset($_POST['toEmail'])) 30 | { 31 | if(intval($textOrCode)==2) 32 | { //if (in_array($_GET["channel"], $userChannels)) 33 | if($message != "" && in_array($imgType,$imageFormats) ) 34 | { 35 | 36 | $sql = "INSERT INTO `direct_message` VALUES(DEFAULT,'$fromEmail','$toEmail','$message','$textOrCode',CURRENT_TIMESTAMP)"; 37 | if (mysqli_query($conn, $sql)) { 38 | 39 | header('Location: ../index.php?email='.$toEmail); 40 | exit; 41 | }else{ 42 | echo "Error: " . $sql . "
" . mysqli_error($conn); 43 | } 44 | 45 | 46 | }else if ($message != ""){ 47 | $textOrCode=0; 48 | $sql = "INSERT INTO `direct_message` VALUES(DEFAULT,'$fromEmail','$toEmail','$message','$textOrCode',CURRENT_TIMESTAMP)"; 49 | if (mysqli_query($conn, $sql)) { 50 | 51 | header('Location: ../index.php?email='.$toEmail); 52 | exit; 53 | }else{ 54 | echo "Error: " . $sql . "
" . mysqli_error($conn); 55 | } 56 | 57 | } 58 | }else{ 59 | 60 | if($message != "") 61 | { 62 | $sql = "INSERT INTO `direct_message` VALUES(DEFAULT,'$fromEmail','$toEmail','$message','$textOrCode',CURRENT_TIMESTAMP)"; 63 | if (mysqli_query($conn, $sql)) { 64 | 65 | header('Location: ../index.php?email='.$toEmail); 66 | exit; 67 | }else{ 68 | echo "Error: " . $sql . "
" . mysqli_error($conn); 69 | } 70 | } 71 | } 72 | 73 | } 74 | else 75 | { 76 | if(intval($textOrCode)==2) 77 | { //if (in_array($_GET["channel"], $userChannels)) 78 | if($message != "" && in_array($imgType,$imageFormats) ) 79 | { 80 | $sql = "INSERT INTO `channel_messages` VALUES(DEFAULT,'$channel_id','$user','$message',DEFAULT,'$textOrCode',CURRENT_TIMESTAMP)"; 81 | if (mysqli_query($conn, $sql)) { 82 | 83 | header('Location: ../index.php?channel='.$channel_id); 84 | exit; 85 | }else{ 86 | echo "Error: " . $sql . "
" . mysqli_error($conn); 87 | } 88 | 89 | 90 | }else if ($message != ""){ 91 | $textOrCode=0; 92 | $sql = "INSERT INTO `channel_messages` VALUES(DEFAULT,'$channel_id','$user','$message',DEFAULT,'$textOrCode',CURRENT_TIMESTAMP)"; 93 | if (mysqli_query($conn, $sql)) { 94 | 95 | header('Location: ../index.php?channel='.$channel_id); 96 | exit; 97 | }else{ 98 | echo "Error: " . $sql . "
" . mysqli_error($conn); 99 | } 100 | 101 | } 102 | }else{ 103 | 104 | if($message != "") 105 | { 106 | $sql = "INSERT INTO `channel_messages` VALUES(DEFAULT,'$channel_id','$user','$message',DEFAULT,'$textOrCode',CURRENT_TIMESTAMP)"; 107 | if (mysqli_query($conn, $sql)) { 108 | 109 | header('Location: ../index.php?channel='.$channel_id); 110 | exit; 111 | }else{ 112 | echo "Error: " . $sql . "
" . mysqli_error($conn); 113 | } 114 | } 115 | } 116 | } 117 | 118 | mysqli_close($conn); 119 | ?> -------------------------------------------------------------------------------- /css/tags/tokenfield-typeahead.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * bootstrap-tokenfield 3 | * https://github.com/sliptree/bootstrap-tokenfield 4 | * Copyright 2013-2014 Sliptree and other contributors; Licensed MIT 5 | */ 6 | /* General Typeahead styling, from http://jsfiddle.net/ragulka/Dy9au/1/ */ 7 | .twitter-typeahead { 8 | width: 100%; 9 | position: relative; 10 | vertical-align: top; 11 | } 12 | .twitter-typeahead .tt-input, 13 | .twitter-typeahead .tt-hint { 14 | margin: 0; 15 | width: 100%; 16 | vertical-align: middle; 17 | background-color: #ffffff; 18 | } 19 | .twitter-typeahead .tt-hint { 20 | color: #999999; 21 | z-index: 1; 22 | border: 1px solid transparent; 23 | } 24 | .twitter-typeahead .tt-input { 25 | color: #555555; 26 | z-index: 2; 27 | } 28 | .twitter-typeahead .tt-input, 29 | .twitter-typeahead .tt-hint { 30 | height: 34px; 31 | padding: 6px 12px; 32 | font-size: 14px; 33 | line-height: 1.428571429; 34 | } 35 | .twitter-typeahead .input-sm.tt-input, 36 | .twitter-typeahead .hint-sm.tt-hint { 37 | border-radius: 3px; 38 | } 39 | .twitter-typeahead .input-lg.tt-input, 40 | .twitter-typeahead .hint-lg.tt-hint { 41 | border-radius: 6px; 42 | } 43 | .input-group .twitter-typeahead:first-child .tt-input, 44 | .input-group .twitter-typeahead:first-child .tt-hint { 45 | border-radius: 4px 0 0 4px !important; 46 | } 47 | .input-group .twitter-typeahead:last-child .tt-input, 48 | .input-group .twitter-typeahead:last-child .tt-hint { 49 | border-radius: 0 4px 4px 0 !important; 50 | } 51 | .input-group.input-group-sm .twitter-typeahead:first-child .tt-input, 52 | .input-group.input-group-sm .twitter-typeahead:first-child .tt-hint { 53 | border-radius: 3px 0 0 3px !important; 54 | } 55 | .input-group.input-group-sm .twitter-typeahead:last-child .tt-input, 56 | .input-group.input-group-sm .twitter-typeahead:last-child .tt-hint { 57 | border-radius: 0 3px 3px 0 !important; 58 | } 59 | .input-sm.tt-input, 60 | .hint-sm.tt-hint, 61 | .input-group.input-group-sm .tt-input, 62 | .input-group.input-group-sm .tt-hint { 63 | height: 30px; 64 | padding: 5px 10px; 65 | font-size: 12px; 66 | line-height: 1.5; 67 | } 68 | .input-group.input-group-lg .twitter-typeahead:first-child .tt-input, 69 | .input-group.input-group-lg .twitter-typeahead:first-child .tt-hint { 70 | border-radius: 6px 0 0 6px !important; 71 | } 72 | .input-group.input-group-lg .twitter-typeahead:last-child .tt-input, 73 | .input-group.input-group-lg .twitter-typeahead:last-child .tt-hint { 74 | border-radius: 0 6px 6px 0 !important; 75 | } 76 | .input-lg.tt-input, 77 | .hint-lg.tt-hint, 78 | .input-group.input-group-lg .tt-input, 79 | .input-group.input-group-lg .tt-hint { 80 | height: 45px; 81 | padding: 10px 16px; 82 | font-size: 18px; 83 | line-height: 1.33; 84 | } 85 | .tt-dropdown-menu { 86 | width: 100%; 87 | min-width: 160px; 88 | margin-top: 2px; 89 | padding: 5px 0; 90 | background-color: #ffffff; 91 | border: 1px solid #ccc; 92 | border: 1px solid rgba(0, 0, 0, 0.15); 93 | *border-right-width: 2px; 94 | *border-bottom-width: 2px; 95 | border-radius: 6px; 96 | -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); 97 | box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); 98 | -webkit-background-clip: padding-box; 99 | -moz-background-clip: padding; 100 | background-clip: padding-box; 101 | } 102 | .tt-suggestion { 103 | display: block; 104 | padding: 3px 20px; 105 | } 106 | .tt-suggestion.tt-cursor { 107 | color: #262626; 108 | background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); 109 | background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); 110 | background-repeat: repeat-x; 111 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); 112 | } 113 | .tt-suggestion.tt-cursor a { 114 | color: #ffffff; 115 | } 116 | .tt-suggestion p { 117 | margin: 0; 118 | } 119 | /* Tokenfield-specific Typeahead styling */ 120 | .tokenfield .twitter-typeahead { 121 | width: auto; 122 | } 123 | .tokenfield .twitter-typeahead .tt-hint { 124 | padding: 0; 125 | height: 20px; 126 | } 127 | .tokenfield.input-sm .twitter-typeahead .tt-input, 128 | .tokenfield.input-sm .twitter-typeahead .tt-hint { 129 | height: 18px; 130 | font-size: 12px; 131 | line-height: 1.5; 132 | } 133 | .tokenfield.input-lg .twitter-typeahead .tt-input, 134 | .tokenfield.input-lg .twitter-typeahead .tt-hint { 135 | height: 23px; 136 | font-size: 18px; 137 | line-height: 1.33; 138 | } 139 | .tokenfield .twitter-typeahead .tt-suggestions { 140 | font-size: 14px; 141 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 |

idYeah!

3 |

(A messaging chat room website like Slack using a LAMP stack)

4 |

Live Site    |    Survival Guide

5 | 6 | ### Introduction 7 |       We took **Slack** to be our model on which our website was to be based. However, we have also added few additional features in order to meet the expectations of our target audience. Slack is a chatroom which is an acronym for **Searchable Log of All Conversation and Knowledge**. As the name indicates, all the content is searchable in Slack. Basically, it is a place for collaboration that works by sending an invitation by the admin or owner to work on a specific project. However, it also has room for direct messaging between the users present in the chatroom. 8 | 9 |       **idYeah!** (platform to share and collaborate on ideas) was made for a similar purpose. However, there are ways in which both the chatrooms differ. In idYeah!, only select content is searchable. Also, users can post code snippets along with pictures and URLs as messages in any group and take feedback or suggestions for the same. Basically, the code snippet feature in our chatroom is to bring ideas to life. we have seen a number of websites accepting the credentials of one of the reputed or authentic sites used by a person. Considering this, GitHub based login was implemented. Users can also use a globally recognized avatar as their default image. Account security is a priority, so an optional two-step authentication has been provided. One additional feature is: existing users are gauged based on their participation in the channels on their profile page. Also, a graphical view of their participation is provided in the user options. 10 | 11 | ### Key Functionalities: 12 | - Can create new public and private channels and add registered members to that channel. 13 | - Archiving a channel. 14 | - Like and Dislike for a post. 15 | - Admin can delete posts from public channels . 16 | - Admin can delete a member from the public channel. 17 | - User can upload images, documents and code snippets. 18 | - User Activity Graph. 19 | - Two Factor Authentication . 20 | - User profile search. 21 | - Login with GitHub. 22 | - Provided an option to use Gravatar image. 23 | 24 | ### DataBase Schema Design 25 | 26 | | ![DB Schema Design](FinalSchema.PNG) | 27 | |:---:| 28 | | DB Schema Design | 29 | 30 | ### Two-step authentication 31 |       Two step authentication has become a common method to implement a secure login process, though we made it available as an option to the user. The user can activate or deactivate this method of authentication by clicking the on and off button in the menu. Once this option is activated the user is sent an email at the time of logging in after verifying his password and captcha, with a one-time passcode prompting authentication. After entering the passcode present in the email, it is verified and the user is redirected to the homepage. Once the passcode is generated by the passcode generator, it is passed through the session variable to the evaluation page and is evaluated against the passcode entered by the user and if it is a match, the user is allowed to the home page. 32 | 33 | | [![2FA OFF](2FAoff.PNG)] | [![2FA ON](2FAon.PNG)] | 34 | |:---:|:---:| 35 | | 2FA OFF | 2FA ON | 36 | 37 | | ![Sample Messaging Room](messages.png) | 38 | |:---:| 39 | | Sample Messaging Room| 40 | 41 | ### GITHUB Integration 42 |       Users have an option of logging in to our website using **GITHUB** credentials. This is achieved by using the services provided by the GITHUB. Once the user clicks on the Login with **GITHUB** option, the user is taken to a new page where he is prompted to enter his credentials and is authenticated by GITHUB. GITHUB checks his credentials and sends a response code denting a success or a failure. If the response denotes a success, the user is redirected to his home page, else he is asked to enter the correct credentials. If the response code denotes a success, along with the response user details are also sent which are used to compare with the user list in the Database and provide the user with his information. 43 | 44 | | ![GITHUB Login](GITHUBLogin.PNG) | 45 | |:---:| 46 | | GITHUB Login | 47 | 48 | 49 | ### Graphs for Metrics 50 |       Every user’s participation is depicted by the means of a graph. A user’s messages and reaction in a channel are the parameters that are used to measure the performance metrics. The overall performance in a channel is calculated on a scale of 100 units. The metrics keep varying for every new post or reaction by a user. 51 | 52 | | ![User Metrics Graphs](UserMetricsGraps.PNG) | 53 | |:---:| 54 | | User Metrics Graphs | 55 | 56 | -------------------------------------------------------------------------------- /newChannel.php: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | Homepage 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 |

Create Channel

49 |
50 |
51 |
52 | 53 | 54 |
55 |
56 | 57 | 58 |
59 |
60 | Private 61 | Public 62 |
63 |
64 | 65 | 66 | 67 |
68 | 69 |
70 | 71 | 72 | 73 |
74 |
75 |
76 | 77 | 78 | 79 | 109 | -------------------------------------------------------------------------------- /css/tags/bootstrap-tokenfield.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * bootstrap-tokenfield 3 | * https://github.com/sliptree/bootstrap-tokenfield 4 | * Copyright 2013-2014 Sliptree and other contributors; Licensed MIT 5 | */ 6 | @-webkit-keyframes blink { 7 | 0% { 8 | border-color: #ededed; 9 | } 10 | 100% { 11 | border-color: #b94a48; 12 | } 13 | } 14 | @-moz-keyframes blink { 15 | 0% { 16 | border-color: #ededed; 17 | } 18 | 100% { 19 | border-color: #b94a48; 20 | } 21 | } 22 | @keyframes blink { 23 | 0% { 24 | border-color: #ededed; 25 | } 26 | 100% { 27 | border-color: #b94a48; 28 | } 29 | } 30 | .tokenfield { 31 | height: auto; 32 | min-height: 34px; 33 | padding-bottom: 0px; 34 | } 35 | .tokenfield.focus { 36 | border-color: #66afe9; 37 | outline: 0; 38 | -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, 0.6); 39 | box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, 0.6); 40 | } 41 | .tokenfield .token { 42 | -webkit-box-sizing: border-box; 43 | -moz-box-sizing: border-box; 44 | box-sizing: border-box; 45 | -webkit-border-radius: 3px; 46 | -moz-border-radius: 3px; 47 | border-radius: 3px; 48 | display: inline-block; 49 | border: 1px solid #d9d9d9; 50 | background-color: #ededed; 51 | white-space: nowrap; 52 | margin: -1px 5px 5px 0; 53 | height: 22px; 54 | vertical-align: top; 55 | cursor: default; 56 | } 57 | .tokenfield .token:hover { 58 | border-color: #b9b9b9; 59 | } 60 | .tokenfield .token.active { 61 | border-color: #52a8ec; 62 | border-color: rgba(82, 168, 236, 0.8); 63 | } 64 | .tokenfield .token.duplicate { 65 | border-color: #ebccd1; 66 | -webkit-animation-name: blink; 67 | animation-name: blink; 68 | -webkit-animation-duration: 0.1s; 69 | animation-duration: 0.1s; 70 | -webkit-animation-direction: normal; 71 | animation-direction: normal; 72 | -webkit-animation-timing-function: ease; 73 | animation-timing-function: ease; 74 | -webkit-animation-iteration-count: infinite; 75 | animation-iteration-count: infinite; 76 | } 77 | .tokenfield .token.invalid { 78 | background: none; 79 | border: 1px solid transparent; 80 | -webkit-border-radius: 0; 81 | -moz-border-radius: 0; 82 | border-radius: 0; 83 | border-bottom: 1px dotted #d9534f; 84 | } 85 | .tokenfield .token.invalid.active { 86 | background: #ededed; 87 | border: 1px solid #ededed; 88 | -webkit-border-radius: 3px; 89 | -moz-border-radius: 3px; 90 | border-radius: 3px; 91 | } 92 | .tokenfield .token .token-label { 93 | display: inline-block; 94 | overflow: hidden; 95 | text-overflow: ellipsis; 96 | padding-left: 4px; 97 | vertical-align: top; 98 | } 99 | .tokenfield .token .close { 100 | font-family: Arial; 101 | display: inline-block; 102 | line-height: 100%; 103 | font-size: 1.1em; 104 | line-height: 1.49em; 105 | margin-left: 5px; 106 | float: none; 107 | height: 100%; 108 | vertical-align: top; 109 | padding-right: 4px; 110 | } 111 | .tokenfield .token-input { 112 | background: none; 113 | width: 60px; 114 | min-width: 60px; 115 | border: 0; 116 | height: 20px; 117 | padding: 0; 118 | margin-bottom: 6px; 119 | -webkit-box-shadow: none; 120 | box-shadow: none; 121 | } 122 | .tokenfield .token-input:focus { 123 | border-color: transparent; 124 | outline: 0; 125 | /* IE6-9 */ 126 | -webkit-box-shadow: none; 127 | box-shadow: none; 128 | } 129 | .tokenfield.disabled { 130 | cursor: not-allowed; 131 | background-color: #eeeeee; 132 | } 133 | .tokenfield.disabled .token-input { 134 | cursor: not-allowed; 135 | } 136 | .tokenfield.disabled .token:hover { 137 | cursor: not-allowed; 138 | border-color: #d9d9d9; 139 | } 140 | .tokenfield.disabled .token:hover .close { 141 | cursor: not-allowed; 142 | opacity: 0.2; 143 | filter: alpha(opacity=20); 144 | } 145 | .has-warning .tokenfield.focus { 146 | border-color: #66512c; 147 | -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b; 148 | box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b; 149 | } 150 | .has-error .tokenfield.focus { 151 | border-color: #843534; 152 | -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483; 153 | box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483; 154 | } 155 | .has-success .tokenfield.focus { 156 | border-color: #2b542c; 157 | -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168; 158 | box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168; 159 | } 160 | .tokenfield.input-sm, 161 | .input-group-sm .tokenfield { 162 | min-height: 30px; 163 | padding-bottom: 0px; 164 | } 165 | .input-group-sm .token, 166 | .tokenfield.input-sm .token { 167 | height: 20px; 168 | margin-bottom: 4px; 169 | } 170 | .input-group-sm .token-input, 171 | .tokenfield.input-sm .token-input { 172 | height: 18px; 173 | margin-bottom: 5px; 174 | } 175 | .tokenfield.input-lg, 176 | .input-group-lg .tokenfield { 177 | min-height: 45px; 178 | padding-bottom: 4px; 179 | } 180 | .input-group-lg .token, 181 | .tokenfield.input-lg .token { 182 | height: 25px; 183 | } 184 | .input-group-lg .token-label, 185 | .tokenfield.input-lg .token-label { 186 | line-height: 23px; 187 | } 188 | .input-group-lg .token .close, 189 | .tokenfield.input-lg .token .close { 190 | line-height: 1.3em; 191 | } 192 | .input-group-lg .token-input, 193 | .tokenfield.input-lg .token-input { 194 | height: 23px; 195 | line-height: 23px; 196 | margin-bottom: 6px; 197 | vertical-align: top; 198 | } 199 | .tokenfield.rtl { 200 | direction: rtl; 201 | text-align: right; 202 | } 203 | .tokenfield.rtl .token { 204 | margin: -1px 0 5px 5px; 205 | } 206 | .tokenfield.rtl .token .token-label { 207 | padding-left: 0px; 208 | padding-right: 4px; 209 | } -------------------------------------------------------------------------------- /css/tags/jquery-migrate-3.0.0.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery Migrate v3.0.0 | (c) jQuery Foundation and other contributors | jquery.org/license */ 2 | "undefined"==typeof jQuery.migrateMute&&(jQuery.migrateMute=!0),function(a,b){"use strict";function c(c){var d=b.console;e[c]||(e[c]=!0,a.migrateWarnings.push(c),d&&d.warn&&!a.migrateMute&&(d.warn("JQMIGRATE: "+c),a.migrateTrace&&d.trace&&d.trace()))}function d(a,b,d,e){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return c(e),d}})}a.migrateVersion="3.0.0",function(){var c=b.console&&b.console.log&&function(){b.console.log.apply(b.console,arguments)},d=/^[12]\./;c&&(a&&!d.test(a.fn.jquery)||c("JQMIGRATE: jQuery 3.0.0+ REQUIRED"),a.migrateWarnings&&c("JQMIGRATE: Migrate plugin loaded multiple times"),c("JQMIGRATE: Migrate is installed"+(a.migrateMute?"":" with logging active")+", version "+a.migrateVersion))}();var e={};a.migrateWarnings=[],void 0===a.migrateTrace&&(a.migrateTrace=!0),a.migrateReset=function(){e={},a.migrateWarnings.length=0},"BackCompat"===document.compatMode&&c("jQuery is not compatible with Quirks Mode");var f=a.fn.init,g=a.isNumeric,h=a.find,i=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,j=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g;a.fn.init=function(a){var b=Array.prototype.slice.call(arguments);return"string"==typeof a&&"#"===a&&(c("jQuery( '#' ) is not a valid selector"),b[0]=[]),f.apply(this,b)},a.fn.init.prototype=a.fn,a.find=function(a){var b=Array.prototype.slice.call(arguments);if("string"==typeof a&&i.test(a))try{document.querySelector(a)}catch(d){a=a.replace(j,function(a,b,c,d){return"["+b+c+'"'+d+'"]'});try{document.querySelector(a),c("Attribute selector with '#' must be quoted: "+b[0]),b[0]=a}catch(e){c("Attribute selector with '#' was not fixed: "+b[0])}}return h.apply(this,b)};var k;for(k in h)Object.prototype.hasOwnProperty.call(h,k)&&(a.find[k]=h[k]);a.fn.size=function(){return c("jQuery.fn.size() is deprecated; use the .length property"),this.length},a.parseJSON=function(){return c("jQuery.parseJSON is deprecated; use JSON.parse"),JSON.parse.apply(null,arguments)},a.isNumeric=function(b){function d(b){var c=b&&b.toString();return!a.isArray(b)&&c-parseFloat(c)+1>=0}var e=g(b),f=d(b);return e!==f&&c("jQuery.isNumeric() should not be called on constructed objects"),f},d(a,"unique",a.uniqueSort,"jQuery.unique is deprecated, use jQuery.uniqueSort"),d(a.expr,"filters",a.expr.pseudos,"jQuery.expr.filters is now jQuery.expr.pseudos"),d(a.expr,":",a.expr.pseudos,'jQuery.expr[":"] is now jQuery.expr.pseudos');var l=a.ajax;a.ajax=function(){var a=l.apply(this,arguments);return a.promise&&(d(a,"success",a.done,"jQXHR.success is deprecated and removed"),d(a,"error",a.fail,"jQXHR.error is deprecated and removed"),d(a,"complete",a.always,"jQXHR.complete is deprecated and removed")),a};var m=a.fn.removeAttr,n=a.fn.toggleClass,o=/\S+/g;a.fn.removeAttr=function(b){var d=this;return a.each(b.match(o),function(b,e){a.expr.match.bool.test(e)&&(c("jQuery.fn.removeAttr no longer sets boolean properties: "+e),d.prop(e,!1))}),m.apply(this,arguments)},a.fn.toggleClass=function(b){return void 0!==b&&"boolean"!=typeof b?n.apply(this,arguments):(c("jQuery.fn.toggleClass( boolean ) is deprecated"),this.each(function(){var c=this.getAttribute&&this.getAttribute("class")||"";c&&a.data(this,"__className__",c),this.setAttribute&&this.setAttribute("class",c||b===!1?"":a.data(this,"__className__")||"")}))};var p=!1;a.swap&&a.each(["height","width","reliableMarginRight"],function(b,c){var d=a.cssHooks[c]&&a.cssHooks[c].get;d&&(a.cssHooks[c].get=function(){var a;return p=!0,a=d.apply(this,arguments),p=!1,a})}),a.swap=function(a,b,d,e){var f,g,h={};p||c("jQuery.swap() is undocumented and deprecated");for(g in b)h[g]=a.style[g],a.style[g]=b[g];f=d.apply(a,e||[]);for(g in b)a.style[g]=h[g];return f};var q=a.data;a.data=function(b,d,e){var f;return d&&d!==a.camelCase(d)&&(f=a.hasData(b)&&q.call(this,b),f&&d in f)?(c("jQuery.data() always sets/gets camelCased names: "+d),arguments.length>2&&(f[d]=e),f[d]):q.apply(this,arguments)};var r=a.Tween.prototype.run;a.Tween.prototype.run=function(b){a.easing[this.easing].length>1&&(c('easing function "jQuery.easing.'+this.easing.toString()+'" should use only first argument'),a.easing[this.easing]=a.easing[this.easing].bind(a.easing,b,this.options.duration*b,0,1,this.options.duration)),r.apply(this,arguments)};var s=a.fn.load,t=a.event.fix;a.event.props=[],a.event.fixHooks={},a.event.fix=function(b){var d,e=b.type,f=this.fixHooks[e],g=a.event.props;if(g.length)for(c("jQuery.event.props are deprecated and removed: "+g.join());g.length;)a.event.addProp(g.pop());if(f&&!f._migrated_&&(f._migrated_=!0,c("jQuery.event.fixHooks are deprecated and removed: "+e),(g=f.props)&&g.length))for(;g.length;)a.event.addProp(g.pop());return d=t.call(this,b),f&&f.filter?f.filter(d,b):d},a.each(["load","unload","error"],function(b,d){a.fn[d]=function(){var a=Array.prototype.slice.call(arguments,0);return"load"===d&&"string"==typeof a[0]?s.apply(this,a):(c("jQuery.fn."+d+"() is deprecated"),a.splice(0,0,d),arguments.length?this.on.apply(this,a):(this.triggerHandler.apply(this,a),this))}}),a(function(){a(document).triggerHandler("ready")}),a.event.special.ready={setup:function(){this===document&&c("'ready' event is deprecated")}},a.fn.extend({bind:function(a,b,d){return c("jQuery.fn.bind() is deprecated"),this.on(a,null,b,d)},unbind:function(a,b){return c("jQuery.fn.unbind() is deprecated"),this.off(a,null,b)},delegate:function(a,b,d,e){return c("jQuery.fn.delegate() is deprecated"),this.on(b,a,d,e)},undelegate:function(a,b,d){return c("jQuery.fn.undelegate() is deprecated"),1===arguments.length?this.off(a,"**"):this.off(b,a||"**",d)}});var u=a.fn.offset;a.fn.offset=function(){var b,d=this[0],e={top:0,left:0};return d&&d.nodeType?(b=(d.ownerDocument||document).documentElement,a.contains(b,d)?u.apply(this,arguments):(c("jQuery.fn.offset() requires an element connected to a document"),e)):(c("jQuery.fn.offset() requires a valid DOM element"),e)};var v=a.param;a.param=function(b,d){var e=a.ajaxSettings&&a.ajaxSettings.traditional;return void 0===d&&e&&(c("jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),d=e),v.call(this,b,d)};var w=a.fn.andSelf||a.fn.addBack;a.fn.andSelf=function(){return c("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),w.apply(this,arguments)};var x=a.Deferred,y=[["resolve","done",a.Callbacks("once memory"),a.Callbacks("once memory"),"resolved"],["reject","fail",a.Callbacks("once memory"),a.Callbacks("once memory"),"rejected"],["notify","progress",a.Callbacks("memory"),a.Callbacks("memory")]];a.Deferred=function(b){var d=x(),e=d.promise();return d.pipe=e.pipe=function(){var b=arguments;return c("deferred.pipe() is deprecated"),a.Deferred(function(c){a.each(y,function(f,g){var h=a.isFunction(b[f])&&b[f];d[g[1]](function(){var b=h&&h.apply(this,arguments);b&&a.isFunction(b.promise)?b.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[g[0]+"With"](this===e?c.promise():this,h?[b]:arguments)})}),b=null}).promise()},b&&b.call(d,d),d}}(jQuery,window); -------------------------------------------------------------------------------- /helpPage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Help Page 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |

Survival Guide

15 | 16 | 41 |
42 |

Channels

43 |
88 |

Messages

89 | 119 |

Happy Surviving!

120 |
121 | 122 | -------------------------------------------------------------------------------- /signup/signUpPage.php: -------------------------------------------------------------------------------- 1 | connect_error) { 14 | die("Connection failed: " . $conn->connect_error); 15 | } 16 | $emailErr = $nameErr= $pswErr =""; 17 | $admin = admin(); 18 | function sendMailForNewUser($email,$userName){ 19 | $return_arrfinal = array(); 20 | $status_array['status'] = '1'; 21 | $mail = new PHPMailer(); 22 | $toarraymail=$email; 23 | $mail->SMTPDebug = 1; // Enable verbose debug output 24 | $mail->Port = '587'; 25 | $mail->isSMTP(); // Set mailer to use SMTP // Specify main and backup SMTP servers // Set mailer to use SMTP 26 | $mail->Host = gethostbyname('smtp.gmail.com'); // Specify main and backup SMTP servers 27 | $mail->SMTPAuth = true; // Authentication must be disabled 28 | 29 | $mail->Username = 'mchandrasekharreddym@gmail.com'; 30 | $mail->Password = 'muthyala1234'; 31 | $mail->SMTPSecure= 'tls'; 32 | 33 | 34 | $mail->setFrom("mchandrasekharreddym@gmail.com","idYeah!"); 35 | $mail->AddAddress($toarraymail); // Add a recipient 36 | // Optional name 37 | $mail->isHTML(true); // Set email format to HTML 38 | 39 | $mail->Subject = 'New User Registration For idYeah!'; 40 | $mail->Body =" Hello $userName,
41 | Thank you for signing up on idYeah! Here are your account details-
42 | Email: $email,
43 | User name: $userName,
44 | Here is the link for logging in - Login Page
45 | idYeah! is a wonderful platform for collaborations. We are happy to have you. We look forward to your active participation.
46 | Thanks,
47 | idYeah! Team."; 48 | $mail->AltBody = 'This is the body in plain text for non-HTML mail clients'; 49 | 50 | 51 | 52 | 53 | if(!$mail->Send()){ 54 | echo "false"; 55 | echo 'Mailer Error: ' . $mail->ErrorInfo; 56 | return false; 57 | }else{ 58 | echo "Sending email"; 59 | return true; 60 | } 61 | echo "Sending email"; 62 | 63 | } 64 | 65 | if(isset($_POST['submit'])) 66 | { 67 | $email = mysqli_real_escape_string($conn,$_POST['email']); 68 | $userName = mysqli_real_escape_string($conn,$_POST['userName']); 69 | $psw = mysqli_real_escape_string($conn,$_POST['psw']); 70 | $pswRepeat = mysqli_real_escape_string($conn,$_POST['pswRepeat']); 71 | 72 | 73 | 74 | //Gravatar 75 | 76 | /** 77 | * Get either a Gravatar URL or complete image tag for a specified email address. 78 | * 79 | * @param string $email The email address 80 | * @param string $s Size in pixels, defaults to 80px [ 1 - 2048 ] 81 | * @param string $d Default imageset to use [ 404 | mm | identicon | monsterid | wavatar ] 82 | * @param string $r Maximum rating (inclusive) [ g | pg | r | x ] 83 | * @param boole $img True to return a complete IMG tag False for just the URL 84 | * @param array $atts Optional, additional key/value attributes to include in the IMG tag 85 | * @return String containing either just a URL or a complete image tag 86 | * @source https://gravatar.com/site/implement/images/php/ 87 | */ 88 | function get_gravatar( $email, $s = 40, $d = 'mm', $r = 'g', $img = false) { 89 | $url = 'https://www.gravatar.com/avatar/'; 90 | $url .= strtolower(md5( strtolower( trim( $email ) ) )); 91 | 92 | $url .= "?s=$s&r=$r"; 93 | if ( $img ) { 94 | $url = ' $val ) 96 | $url .= ' ' . $key . '="' . $val . '"'; 97 | $url .= ' />'; 98 | } 99 | return $url; 100 | } 101 | $gravatarUrl = get_gravatar($email); 102 | ////end of gravatar 103 | 104 | if(empty($psw) && empty($pswRepeat) ) { 105 | $pswErr = "Password is required"; 106 | }else{ 107 | $psw = test_input($psw); 108 | $pswRepeat=test_input($pswRepeat); 109 | } 110 | //echo $email."

".$userName."

".$psw."

".$pswRepeat."

"; 111 | $sql = "SELECT * FROM users where email= '".$email."'"; 112 | $result = $conn->query($sql); 113 | $row = $result->fetch_assoc(); 114 | if($_POST && ($row['email']==$email)){ 115 | $emailErr = "User already exist"; 116 | } 117 | else{ 118 | //Email validation 119 | if(empty($email)) { 120 | $emailErr = "Email is required"; 121 | }else{ 122 | $email = test_input($email); 123 | if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { 124 | $emailErr = "Invalid email "; 125 | }else{ 126 | if($psw==$pswRepeat){ 127 | 128 | $sql = "INSERT INTO `users` VALUES('$email','$userName','$userName',DEFAULT,DEFAULT,DEFAULT,DEFAULT,'$psw',DEFAULT,DEFAULT,CURRENT_TIMESTAMP)"; 129 | if (mysqli_query($conn, $sql)) { 130 | sendMailForNewUser($email,$userName); 131 | $sql1 = "INSERT INTO `userChannels` VALUES('$email',1,CURRENT_TIMESTAMP,DEFAULT)"; 132 | $sql2 = "INSERT INTO `userChannels` VALUES('$email',2,CURRENT_TIMESTAMP,DEFAULT)"; 133 | $sql3 = "INSERT INTO `gravatar` VALUES(DEFAULT,'$email','$gravatarUrl',CURRENT_TIMESTAMP)"; 134 | $sqlResult1 = mysqli_query($conn, $sql1); 135 | $sqlResult2 = mysqli_query($conn, $sql2); 136 | $sqlResult3 = mysqli_query($conn, $sql3); 137 | // echo "

**** Registered successfully ***

"; 138 | // header("location: ../login/login.php"); 139 | if(in_array($_SESSION['email'], $admin)){ 140 | header("location: ../index.php"); 141 | }else{ 142 | header("location: ../login/login.php"); 143 | } 144 | }else{ 145 | // echo "

**** failed registering ***

"; 146 | echo $sql; 147 | } 148 | 149 | }else{ 150 | $pswErr = "Password didn't matched"; 151 | } 152 | 153 | } 154 | } 155 | 156 | 157 | } 158 | } 159 | function test_input($data) { 160 | $data = trim($data); 161 | $data = stripslashes($data); 162 | $data = htmlspecialchars($data); 163 | return $data; 164 | } 165 | 166 | 167 | ?> 168 | 169 | 170 | 171 | 172 | SignUpPage 173 | 174 | 175 | 176 | 177 | 178 | 179 |
180 |

Slack Signup Form

181 |
" method="post" style="border-top:2px solid #e0ebe1"> 182 |
183 | * 184 | 185 | * 186 | 187 | *
188 | 189 | *
190 | 191 | Remember me 192 | 193 | 194 |
195 | 196 |
197 |
198 |
199 |
200 | 201 | 202 | -------------------------------------------------------------------------------- /assets/php/class.pop3.php: -------------------------------------------------------------------------------- 1 | pop_conn = 0; 135 | $this->connected = false; 136 | $this->error = null; 137 | } 138 | 139 | /** 140 | * Combination of public events - connect, login, disconnect 141 | * @access public 142 | * @param string $host 143 | * @param integer $port 144 | * @param integer $tval 145 | * @param string $username 146 | * @param string $password 147 | */ 148 | public function Authorise ($host, $port = false, $tval = false, $username, $password, $debug_level = 0) { 149 | $this->host = $host; 150 | 151 | // If no port value is passed, retrieve it 152 | if ($port == false) { 153 | $this->port = $this->POP3_PORT; 154 | } else { 155 | $this->port = $port; 156 | } 157 | 158 | // If no port value is passed, retrieve it 159 | if ($tval == false) { 160 | $this->tval = $this->POP3_TIMEOUT; 161 | } else { 162 | $this->tval = $tval; 163 | } 164 | 165 | $this->do_debug = $debug_level; 166 | $this->username = $username; 167 | $this->password = $password; 168 | 169 | // Refresh the error log 170 | $this->error = null; 171 | 172 | // Connect 173 | $result = $this->Connect($this->host, $this->port, $this->tval); 174 | 175 | if ($result) { 176 | $login_result = $this->Login($this->username, $this->password); 177 | 178 | if ($login_result) { 179 | $this->Disconnect(); 180 | 181 | return true; 182 | } 183 | 184 | } 185 | 186 | // We need to disconnect regardless if the login succeeded 187 | $this->Disconnect(); 188 | 189 | return false; 190 | } 191 | 192 | /** 193 | * Connect to the POP3 server 194 | * @access public 195 | * @param string $host 196 | * @param integer $port 197 | * @param integer $tval 198 | * @return boolean 199 | */ 200 | public function Connect ($host, $port = false, $tval = 30) { 201 | // Are we already connected? 202 | if ($this->connected) { 203 | return true; 204 | } 205 | 206 | /* 207 | On Windows this will raise a PHP Warning error if the hostname doesn't exist. 208 | Rather than supress it with @fsockopen, let's capture it cleanly instead 209 | */ 210 | 211 | set_error_handler(array(&$this, 'catchWarning')); 212 | 213 | // Connect to the POP3 server 214 | $this->pop_conn = fsockopen($host, // POP3 Host 215 | $port, // Port # 216 | $errno, // Error Number 217 | $errstr, // Error Message 218 | $tval); // Timeout (seconds) 219 | 220 | // Restore the error handler 221 | restore_error_handler(); 222 | 223 | // Does the Error Log now contain anything? 224 | if ($this->error && $this->do_debug >= 1) { 225 | $this->displayErrors(); 226 | } 227 | 228 | // Did we connect? 229 | if ($this->pop_conn == false) { 230 | // It would appear not... 231 | $this->error = array( 232 | 'error' => "Failed to connect to server $host on port $port", 233 | 'errno' => $errno, 234 | 'errstr' => $errstr 235 | ); 236 | 237 | if ($this->do_debug >= 1) { 238 | $this->displayErrors(); 239 | } 240 | 241 | return false; 242 | } 243 | 244 | // Increase the stream time-out 245 | 246 | // Check for PHP 4.3.0 or later 247 | if (version_compare(phpversion(), '5.0.0', 'ge')) { 248 | stream_set_timeout($this->pop_conn, $tval, 0); 249 | } else { 250 | // Does not work on Windows 251 | if (substr(PHP_OS, 0, 3) !== 'WIN') { 252 | socket_set_timeout($this->pop_conn, $tval, 0); 253 | } 254 | } 255 | 256 | // Get the POP3 server response 257 | $pop3_response = $this->getResponse(); 258 | 259 | // Check for the +OK 260 | if ($this->checkResponse($pop3_response)) { 261 | // The connection is established and the POP3 server is talking 262 | $this->connected = true; 263 | return true; 264 | } 265 | 266 | } 267 | 268 | /** 269 | * Login to the POP3 server (does not support APOP yet) 270 | * @access public 271 | * @param string $username 272 | * @param string $password 273 | * @return boolean 274 | */ 275 | public function Login ($username = '', $password = '') { 276 | if ($this->connected == false) { 277 | $this->error = 'Not connected to POP3 server'; 278 | 279 | if ($this->do_debug >= 1) { 280 | $this->displayErrors(); 281 | } 282 | } 283 | 284 | if (empty($username)) { 285 | $username = $this->username; 286 | } 287 | 288 | if (empty($password)) { 289 | $password = $this->password; 290 | } 291 | 292 | $pop_username = "USER $username" . $this->CRLF; 293 | $pop_password = "PASS $password" . $this->CRLF; 294 | 295 | // Send the Username 296 | $this->sendString($pop_username); 297 | $pop3_response = $this->getResponse(); 298 | 299 | if ($this->checkResponse($pop3_response)) { 300 | // Send the Password 301 | $this->sendString($pop_password); 302 | $pop3_response = $this->getResponse(); 303 | 304 | if ($this->checkResponse($pop3_response)) { 305 | return true; 306 | } else { 307 | return false; 308 | } 309 | } else { 310 | return false; 311 | } 312 | } 313 | 314 | /** 315 | * Disconnect from the POP3 server 316 | * @access public 317 | */ 318 | public function Disconnect () { 319 | $this->sendString('QUIT'); 320 | 321 | fclose($this->pop_conn); 322 | } 323 | 324 | ///////////////////////////////////////////////// 325 | // Private Methods 326 | ///////////////////////////////////////////////// 327 | 328 | /** 329 | * Get the socket response back. 330 | * $size is the maximum number of bytes to retrieve 331 | * @access private 332 | * @param integer $size 333 | * @return string 334 | */ 335 | private function getResponse ($size = 128) { 336 | $pop3_response = fgets($this->pop_conn, $size); 337 | 338 | return $pop3_response; 339 | } 340 | 341 | /** 342 | * Send a string down the open socket connection to the POP3 server 343 | * @access private 344 | * @param string $string 345 | * @return integer 346 | */ 347 | private function sendString ($string) { 348 | $bytes_sent = fwrite($this->pop_conn, $string, strlen($string)); 349 | 350 | return $bytes_sent; 351 | } 352 | 353 | /** 354 | * Checks the POP3 server response for +OK or -ERR 355 | * @access private 356 | * @param string $string 357 | * @return boolean 358 | */ 359 | private function checkResponse ($string) { 360 | if (substr($string, 0, 3) !== '+OK') { 361 | $this->error = array( 362 | 'error' => "Server reported an error: $string", 363 | 'errno' => 0, 364 | 'errstr' => '' 365 | ); 366 | 367 | if ($this->do_debug >= 1) { 368 | $this->displayErrors(); 369 | } 370 | 371 | return false; 372 | } else { 373 | return true; 374 | } 375 | 376 | } 377 | 378 | /** 379 | * If debug is enabled, display the error message array 380 | * @access private 381 | */ 382 | private function displayErrors () { 383 | echo '
';
384 | 
385 |     foreach ($this->error as $single_error) {
386 |       print_r($single_error);
387 |     }
388 | 
389 |     echo '
'; 390 | } 391 | 392 | /** 393 | * Takes over from PHP for the socket warning handler 394 | * @access private 395 | * @param integer $errno 396 | * @param string $errstr 397 | * @param string $errfile 398 | * @param integer $errline 399 | */ 400 | private function catchWarning ($errno, $errstr, $errfile, $errline) { 401 | $this->error[] = array( 402 | 'error' => "Connecting to the POP3 server raised a PHP warning: ", 403 | 'errno' => $errno, 404 | 'errstr' => $errstr 405 | ); 406 | } 407 | 408 | // End of class 409 | } 410 | ?> 411 | -------------------------------------------------------------------------------- /index.css: -------------------------------------------------------------------------------- 1 | 2 | .headrow{ 3 | height: 70px; 4 | } 5 | .line { 6 | height: 5px; 7 | background: #FFEE90; 8 | } 9 | .userInfo{ 10 | background-color: #404040;width: 13%;height: 70px;color: white;padding: 1% !important; 11 | } 12 | .profileSearchField{ 13 | width: 63%; 14 | float: right; 15 | margin-top: 7px; 16 | } 17 | .listOfProfileSearch{ 18 | width: 51%; 19 | float: right; 20 | z-index: 1; 21 | position: relative; 22 | 23 | } 24 | #profileSearchInputField{ 25 | border-radius: 5px; 26 | } 27 | .leftSideMenu{ 28 | background-color: #404040; 29 | /*width:13% !important;*/ 30 | padding: 0px 0; 31 | overflow-y: auto; 32 | overflow-x: hidden; 33 | height: 93%; 34 | } 35 | .userMenuList{ 36 | margin-right: 5px; 37 | } 38 | .postingOptionMenu{ 39 | margin-right: 5px; 40 | font-size: 120%; 41 | } 42 | .message{ 43 | height: 45px !important; 44 | border-bottom-right-radius: 5px !important; 45 | border-top-right-radius: 5px !important; 46 | } 47 | .userMenuLink{ 48 | text-decoration: none !important; 49 | } 50 | .multipleOptions{ 51 | /*padding-top: 15px !important; 52 | padding-bottom: 15px !important;*/ 53 | background-color: white !important; 54 | } 55 | li>*{ 56 | /*padding-left: 7%;*/ 57 | } 58 | /*#channel{ 59 | padding-left: 6% ; 60 | }*/ 61 | 62 | .listbg:hover{ 63 | box-shadow: 0 0 6px rgba(35, 173, 255, 1); 64 | background-color: #333 !important; 65 | color: white; 66 | font-family: "Comic Sans MS", cursive, sans-serif; 67 | letter-spacing: 0.05em; 68 | } 69 | .listbg{ 70 | font-family: "Comic Sans MS", cursive, sans-serif; 71 | letter-spacing: 0.05em; 72 | margin-bottom: 5px; 73 | padding: 2% 12% !important; 74 | } 75 | head,body{ 76 | width: 100%; margin: 0 auto; overflow: hidden; 77 | font-size: 1.5vh; 78 | } 79 | .nopadding{ 80 | padding: 0px !important; 81 | } 82 | #footer { 83 | position: fixed; 84 | bottom: 0; 85 | /*width: 87%;*/ 86 | min-height: 4.8em !important; 87 | } 88 | .listheader{ 89 | padding: 12%; 90 | } 91 | .starredList{ 92 | margin-top: 10%; 93 | font-size: 1.4vh; 94 | } 95 | ui{ 96 | padding: 0px; 97 | 98 | } 99 | .channeldiv{ 100 | /*text-align: center;*/ 101 | background-color: transparent; 102 | /*padding-bottom: 5%;*/ 103 | padding-top: 5%; 104 | font-family: "Comic Sans MS", cursive, sans-serif; 105 | letter-spacing: 0.2em; 106 | font-size: 1.7vh; 107 | 108 | } 109 | .channeldiv:hover{ 110 | /*text-align: center;*/ 111 | background-color: #383836; 112 | /*background-color: transparent;*/ 113 | /*padding-bottom: 5%;*/ 114 | padding-top: 5%; 115 | font-family: "Comic Sans MS", cursive, sans-serif; 116 | letter-spacing: 0.2em; 117 | font-size: 1.7vh; 118 | 119 | } 120 | .Starreddiv{ 121 | /*text-align: center;*/ 122 | background-color: transparent; 123 | padding-bottom: 4%; 124 | padding-top: 4%; 125 | padding-left: 11% !important; 126 | color: white; 127 | font-family: "Comic Sans MS", cursive, sans-serif; 128 | letter-spacing: 0.2em; 129 | 130 | } 131 | .Starreddiv:hover{ 132 | /*text-align: center;*/ 133 | background-color: #383836; 134 | /*background-color: transparent;*/ 135 | padding-bottom: 4%; 136 | padding-top: 4%; 137 | color: white; 138 | font-family: "Comic Sans MS", cursive, sans-serif; 139 | letter-spacing: 0.2em; 140 | 141 | } 142 | .directmsgdiv{ 143 | /*text-align: center;*/ 144 | background-color: transparent; 145 | padding-bottom: 5%; 146 | padding-top: 5%; 147 | font-family: "Comic Sans MS", cursive, sans-serif; 148 | letter-spacing: 0.2em; 149 | 150 | } 151 | .directmsgdiv:hover{ 152 | /*text-align: center;*/ 153 | background-color: #383836; 154 | /*background-color: transparent;*/ 155 | padding-bottom: 5%; 156 | padding-top: 5%; 157 | font-family: "Comic Sans MS", cursive, sans-serif; 158 | letter-spacing: 0.2em; 159 | 160 | } 161 | .userProfile{ 162 | margin-left: 70%; 163 | width: 260%; 164 | } 165 | .textinput{ 166 | 167 | /*margin-left: 18px;*/ 168 | width: 100%; 169 | } 170 | .textinput1{ 171 | position: absolute !important; 172 | /*margin-left: 18px;*/ 173 | width: 100%; 174 | margin-top: 0px; 175 | bottom: 0px; 176 | } 177 | .btnadj{ 178 | margin-top: 0.3em; 179 | padding-left: 0.3em; 180 | } 181 | .link{ 182 | color:white; 183 | padding-left: 6%; 184 | } 185 | .link:hover{ 186 | color:white; 187 | text-decoration: none; 188 | padding-left: 6%; 189 | } 190 | .directmsgList{ 191 | margin-top: 10%; 192 | 193 | } 194 | 195 | .icon-plus { 196 | background-color: #404040; 197 | border-radius:8px; 198 | -webkit-border-radius:8px; 199 | -moz-border-radius:8px; 200 | width: 16px; 201 | height: 16px; 202 | position: relative; 203 | top:0; 204 | left:0; 205 | margin-top: 3px; 206 | } 207 | .icon-plus:after { 208 | background-color: #fff; 209 | width: 8px; 210 | height: 2px; 211 | border-radius: 1px; 212 | -webkit-border-radius: 1px; 213 | -moz-border-radius: 1px; 214 | position: absolute; 215 | top:7px; 216 | left: 4px; 217 | content:""; 218 | 219 | } 220 | .icon-plus:before { 221 | background-color: #fff; 222 | width: 2px; 223 | height: 8px; 224 | border-radius: 1px; 225 | -webkit-border-radius: 1px; 226 | -moz-border-radius: 1px; 227 | position: absolute; 228 | top:4px; 229 | left: 7px; 230 | content:""; 231 | 232 | } 233 | .btnsend{ 234 | padding: 13px !important; 235 | border-top-right-radius: 10px !important; 236 | border-bottom-right-radius: 10px !important; 237 | border-top-left-radius: 0px !important; 238 | border-bottom-left-radius: 0px !important; 239 | width: 4%; 240 | } 241 | .channel_title{ 242 | font-size: 154%; 243 | color: #706c6c; 244 | } 245 | .checked { 246 | color: orange; 247 | font-size: 141% !important; 248 | } 249 | .divider{ 250 | font-size: 140%; 251 | color: #706c6c; 252 | } 253 | .purposeChannel{ 254 | font-size: 110%; 255 | color: #706c6c; 256 | } 257 | .detailsOfChannel{ 258 | 259 | } 260 | .addChannel{ 261 | background-color: #404040; 262 | color: white; 263 | padding: 0px !important; 264 | } 265 | .addChannel:active{ 266 | background-color: #404040; 267 | color: white !important;; 268 | padding: 0px !important; 269 | } 270 | .likeIcon{ 271 | 272 | /* padding: 7px; */ 273 | margin-left: 55px; 274 | padding-right: 5px; 275 | margin-top: 7px; 276 | /* color: #5a49e3; */ 277 | } 278 | .likeIcon:hover{ 279 | 280 | /* padding: 7px; */ 281 | margin-left: 55px; 282 | padding-right: 5px; 283 | margin-top: 7px; 284 | color: #5a49e3; 285 | cursor: pointer; 286 | text-align: center; 287 | } 288 | .dislikeIcon{ 289 | 290 | padding-right: 5px; 291 | padding-left: 10px; 292 | } 293 | .dislikeIcon:hover{ 294 | 295 | padding-right: 5px; 296 | color: #5a49e3; 297 | padding-left: 10px; 298 | cursor: pointer; 299 | text-align: center; 300 | } 301 | .replyMsgIcon{ 302 | font-size: 186%; 303 | cursor: pointer; 304 | margin-left: 1%; 305 | } 306 | .replyButton{ 307 | padding: 12px !important; 308 | border-bottom-left-radius: 0 !important; 309 | border-top-left-radius: 0 !important; 310 | border-top-right-radius: -41px; 311 | /*border-top-right-radius: 10px !important;*/ 312 | /*border-bottom-right-radius: 10px !important;*/ 313 | } 314 | 315 | .emptyChannel{ 316 | margin-left: 37%; 317 | margin-top: 22%; 318 | opacity: 0.4; 319 | /* color: green; */ 320 | font-family: "Comic Sans MS", cursive, sans-serif; 321 | } 322 | .newChannel{ 323 | color:white; 324 | cursor:pointer; 325 | 326 | } 327 | .codeDisplay{ 328 | max-height: 20%; 329 | border-left: 4px solid #4CAF50; 330 | } 331 | .codeArea{ 332 | min-height: 30%; 333 | } 334 | .channelHeading{ 335 | 336 | } 337 | .channelFormDiv{ 338 | padding-left: 5%; 339 | padding-right: 5%; 340 | padding-bottom: 6%; 341 | } 342 | .arrowLeft{ 343 | font-size: 230% !important; 344 | margin-left: 2%; 345 | margin-top: 3%; 346 | cursor: pointer; 347 | } 348 | 349 | 350 | .dropbtn { 351 | background-color: #404040; 352 | color: white; 353 | font-size: 18px; 354 | border: none; 355 | cursor: pointer; 356 | font-size: 1.9vh; 357 | } 358 | 359 | .dropbtn:hover, .dropbtn:focus { 360 | background-color: #404040; 361 | } 362 | 363 | .dropdown { 364 | position: relative; 365 | display: inline-block; 366 | 367 | z-index: 100; 368 | } 369 | 370 | .dropdown-content { 371 | display: none; 372 | position: absolute; 373 | background-color: #f9f9f9; 374 | min-width: 160px; 375 | overflow: auto; 376 | box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); 377 | z-index: 1; 378 | border-radius: 5%; 379 | padding: 10%; 380 | } 381 | 382 | .dropdown-content a { 383 | color: black; 384 | padding: 12px 16px; 385 | text-decoration: none; 386 | display: block; 387 | } 388 | 389 | .dropdown a:hover {background-color: #f1f1f1} 390 | 391 | .show {display:block;} 392 | 393 | /*pagination styling*/ 394 | #content{ 395 | padding: 15px; 396 | border: solid 1px #eee; 397 | max-width: 660px; 398 | margin: auto; 399 | border-radius: 4px; 400 | } 401 | .myPagination{ 402 | margin-top: 0 !important; 403 | margin-bottom: 0 !important; 404 | float: right; 405 | } 406 | 407 | 408 | /*image upload css*/ 409 | 410 | .upload-button { 411 | padding: 4px; 412 | border: 1px solid black; 413 | border-radius: 5px; 414 | display: block; 415 | float: left; 416 | } 417 | .upload-document { 418 | padding: 4px; 419 | border: 1px solid black; 420 | border-radius: 5px; 421 | display: block; 422 | float: left; 423 | } 424 | .imageUploadBtn{ 425 | 426 | border: 1px solid black; 427 | border-radius: 5px; 428 | margin-top: 1%; 429 | margin-left: 37%; 430 | padding-top: 2%; 431 | padding-bottom: 2%; 432 | font-family: "Comic Sans MS", cursive, sans-serif; 433 | background-color: white; 434 | font-weight: 600; 435 | } 436 | .imageUploadBtn:hover{ 437 | color: #3595de; 438 | } 439 | .profile-pic { 440 | max-width: 200px; 441 | max-height: 200px; 442 | display: block; 443 | } 444 | .profile-pic1 { 445 | height: 41%; 446 | width: 101%; 447 | border-radius: 2%; 448 | display: block; 449 | border: 6px !important; 450 | border: 3px solid #cccccc !important; 451 | cursor:pointer; 452 | } 453 | .updatePic:hover{ 454 | opacity: 0.3; 455 | } 456 | .file-upload { 457 | display: none; 458 | } 459 | /*end of Image upload css*/ 460 | .channelMembersLink{ 461 | padding-right: 5px !important; 462 | padding-left: 10px !important; 463 | } 464 | .channelMembersUl{ 465 | margin-left: 7%; 466 | overflow-y: auto; 467 | height: 450%; 468 | } 469 | .helpPage{ 470 | position: absolute; 471 | z-index: 100; 472 | margin-top: 30%; 473 | } 474 | 475 | #threadContainer{ 476 | border-radius: 0px; 477 | border-color: #cccccc !important; 478 | } 479 | .threadHeading{ 480 | border-radius: 0px !important; 481 | padding-top: 5% !important; 482 | padding-bottom: 5% !important; 483 | } 484 | /*.thread_wrapper{ 485 | height: 64%; 486 | 487 | }*/ 488 | .rightThread{ 489 | margin-left: 0px; 490 | padding: 5px 5px; 491 | background-color: white; 492 | /*border-radius: 10px;*/ 493 | 494 | } 495 | .threadClose{ 496 | color: rgb(255, 255, 255) !important; 497 | font-weight: 100 !important; 498 | opacity: 1 !important; 499 | } 500 | .threadClose:hover{ 501 | color: rgb(255, 255, 255) !important; 502 | font-weight: 100!important; 503 | opacity: 1 !important; 504 | } 505 | #threadContainerBody{ 506 | padding: 0px; 507 | height: 85%; 508 | overflow-y: auto; 509 | overflow-x:hidden; 510 | } 511 | .copyRight{ 512 | position: fixed !important; 513 | bottom: 0px; 514 | z-index: 100; 515 | font-size: 1vh; 516 | text-align: center; 517 | /*background-color: #404040;*/ 518 | color: black; 519 | padding-top: 1em; 520 | padding-bottom: 0.4em; 521 | font-family: "Comic Sans MS", cursive, sans-serif; 522 | } 523 | 524 | 525 | /*logIn Activity*/ 526 | .vertical-text { 527 | transform: rotate(90deg); 528 | transform-origin: left top 0; 529 | } 530 | path { 531 | stroke: steelblue; 532 | stroke-width: 2; 533 | fill: none; 534 | } 535 | 536 | .axis path, 537 | .axis line { 538 | fill: none; 539 | stroke: grey; 540 | stroke-width: 1; 541 | shape-rendering: crispEdges; 542 | } 543 | /*pie chart*/ 544 | .slice text { 545 | font-size: 16pt; 546 | font-family: Arial; 547 | } -------------------------------------------------------------------------------- /css/tags/typeahead.bundle.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * typeahead.js 0.10.1 3 | * https://github.com/twitter/typeahead.js 4 | * Copyright 2013 Twitter, Inc. and other contributors; Licensed MIT 5 | */ 6 | 7 | !function(a){var b={isMsie:function(){return/(msie|trident)/i.test(navigator.userAgent)?navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]:!1},isBlankString:function(a){return!a||/^\s*$/.test(a)},escapeRegExChars:function(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(a){return"string"==typeof a},isNumber:function(a){return"number"==typeof a},isArray:a.isArray,isFunction:a.isFunction,isObject:a.isPlainObject,isUndefined:function(a){return"undefined"==typeof a},bind:a.proxy,each:function(b,c){function d(a,b){return c(b,a)}a.each(b,d)},map:a.map,filter:a.grep,every:function(b,c){var d=!0;return b?(a.each(b,function(a,e){return(d=c.call(null,e,a,b))?void 0:!1}),!!d):d},some:function(b,c){var d=!1;return b?(a.each(b,function(a,e){return(d=c.call(null,e,a,b))?!1:void 0}),!!d):d},mixin:a.extend,getUniqueId:function(){var a=0;return function(){return a++}}(),templatify:function(b){function c(){return String(b)}return a.isFunction(b)?b:c},defer:function(a){setTimeout(a,0)},debounce:function(a,b,c){var d,e;return function(){var f,g,h=this,i=arguments;return f=function(){d=null,c||(e=a.apply(h,i))},g=c&&!d,clearTimeout(d),d=setTimeout(f,b),g&&(e=a.apply(h,i)),e}},throttle:function(a,b){var c,d,e,f,g,h;return g=0,h=function(){g=new Date,e=null,f=a.apply(c,d)},function(){var i=new Date,j=b-(i-g);return c=this,d=arguments,0>=j?(clearTimeout(e),e=null,g=i,f=a.apply(c,d)):e||(e=setTimeout(h,j)),f}},noop:function(){}},c="0.10.1",d=function(){function a(a){this.maxSize=a||100,this.size=0,this.hash={},this.list=new c}function c(){this.head=this.tail=null}function d(a,b){this.key=a,this.val=b,this.prev=this.next=null}return b.mixin(a.prototype,{set:function(a,b){var c,e=this.list.tail;this.size>=this.maxSize&&(this.list.remove(e),delete this.hash[e.key]),(c=this.hash[a])?(c.val=b,this.list.moveToFront(c)):(c=new d(a,b),this.list.add(c),this.hash[a]=c,this.size++)},get:function(a){var b=this.hash[a];return b?(this.list.moveToFront(b),b.val):void 0}}),b.mixin(c.prototype,{add:function(a){this.head&&(a.next=this.head,this.head.prev=a),this.head=a,this.tail=this.tail||a},remove:function(a){a.prev?a.prev.next=a.next:this.head=a.next,a.next?a.next.prev=a.prev:this.tail=a.prev},moveToFront:function(a){this.remove(a),this.add(a)}}),a}(this),e=function(){function a(a){this.prefix=["__",a,"__"].join(""),this.ttlKey="__ttl__",this.keyMatcher=new RegExp("^"+this.prefix)}function c(){return(new Date).getTime()}function d(a){return JSON.stringify(b.isUndefined(a)?null:a)}function e(a){return JSON.parse(a)}var f,g;try{f=window.localStorage,f.setItem("~~~","!"),f.removeItem("~~~")}catch(h){f=null}return g=f&&window.JSON?{_prefix:function(a){return this.prefix+a},_ttlKey:function(a){return this._prefix(a)+this.ttlKey},get:function(a){return this.isExpired(a)&&this.remove(a),e(f.getItem(this._prefix(a)))},set:function(a,e,g){return b.isNumber(g)?f.setItem(this._ttlKey(a),d(c()+g)):f.removeItem(this._ttlKey(a)),f.setItem(this._prefix(a),d(e))},remove:function(a){return f.removeItem(this._ttlKey(a)),f.removeItem(this._prefix(a)),this},clear:function(){var a,b,c=[],d=f.length;for(a=0;d>a;a++)(b=f.key(a)).match(this.keyMatcher)&&c.push(b.replace(this.keyMatcher,""));for(a=c.length;a--;)this.remove(c[a]);return this},isExpired:function(a){var d=e(f.getItem(this._ttlKey(a)));return b.isNumber(d)&&c()>d?!0:!1}}:{get:b.noop,set:b.noop,remove:b.noop,clear:b.noop,isExpired:b.noop},b.mixin(a.prototype,g),a}(),f=function(){function c(b){b=b||{},this._send=b.transport?e(b.transport):a.ajax,this._get=b.rateLimiter?b.rateLimiter(this._get):this._get}function e(c){return function(d,e){function f(a){b.defer(function(){h.resolve(a)})}function g(a){b.defer(function(){h.reject(a)})}var h=a.Deferred();return c(d,e,f,g),h}}var f=0,g={},h=6,i=new d(10);return c.setMaxPendingRequests=function(a){h=a},c.resetCache=function(){i=new d(10)},b.mixin(c.prototype,{_get:function(a,b,c){function d(b){c&&c(b),i.set(a,b)}function e(){f--,delete g[a],k.onDeckRequestArgs&&(k._get.apply(k,k.onDeckRequestArgs),k.onDeckRequestArgs=null)}var j,k=this;(j=g[a])?j.done(d):h>f?(f++,g[a]=this._send(a,b).done(d).always(e)):this.onDeckRequestArgs=[].slice.call(arguments,0)},get:function(a,c,d){var e;return b.isFunction(c)&&(d=c,c={}),(e=i.get(a))?b.defer(function(){d&&d(e)}):this._get(a,c,d),!!e}}),c}(),g=function(){function c(b){b=b||{},b.datumTokenizer&&b.queryTokenizer||a.error("datumTokenizer and queryTokenizer are both required"),this.datumTokenizer=b.datumTokenizer,this.queryTokenizer=b.queryTokenizer,this.datums=[],this.trie=e()}function d(a){return a=b.filter(a,function(a){return!!a}),a=b.map(a,function(a){return a.toLowerCase()})}function e(){return{ids:[],children:{}}}function f(a){for(var b={},c=[],d=0;db[e]?e++:(f.push(a[d]),d++,e++);return f}return b.mixin(c.prototype,{bootstrap:function(a){this.datums=a.datums,this.trie=a.trie},add:function(a){var c=this;a=b.isArray(a)?a:[a],b.each(a,function(a){var f,g;f=c.datums.push(a)-1,g=d(c.datumTokenizer(a)),b.each(g,function(a){var b,d,g;for(b=c.trie,d=a.split("");g=d.shift();)b=b.children[g]||(b.children[g]=e()),b.ids.push(f)})})},get:function(a){var c,e,h=this;return c=d(this.queryTokenizer(a)),b.each(c,function(a){var b,c,d,f;if(e&&0===e.length)return!1;for(b=h.trie,c=a.split("");b&&(d=c.shift());)b=b.children[d];return b&&0===c.length?(f=b.ids.slice(0),void(e=e?g(e,f):f)):(e=[],!1)}),e?b.map(f(e),function(a){return h.datums[a]}):[]},serialize:function(){return{datums:this.datums,trie:this.trie}}}),c}(),h=function(){function d(a){var c=a.local||null;return b.isFunction(c)&&(c=c.call(null)),c}function e(d){var e,f;return f={url:null,thumbprint:"",ttl:864e5,filter:null,ajax:{}},(e=d.prefetch||null)&&(e=b.isString(e)?{url:e}:e,e=b.mixin(f,e),e.thumbprint=c+e.thumbprint,e.ajax.type=e.ajax.type||"GET",e.ajax.dataType=e.ajax.dataType||"json",!e.url&&a.error("prefetch requires url to be set")),e}function f(c){function d(a){return function(c){return b.debounce(c,a)}}function e(a){return function(c){return b.throttle(c,a)}}var f,g;return g={url:null,wildcard:"%QUERY",replace:null,rateLimitBy:"debounce",rateLimitWait:300,send:null,filter:null,ajax:{}},(f=c.remote||null)&&(f=b.isString(f)?{url:f}:f,f=b.mixin(g,f),f.rateLimiter=/^throttle$/i.test(f.rateLimitBy)?e(f.rateLimitWait):d(f.rateLimitWait),f.ajax.type=f.ajax.type||"GET",f.ajax.dataType=f.ajax.dataType||"json",delete f.rateLimitBy,delete f.rateLimitWait,!f.url&&a.error("remote requires url to be set")),f}return{local:d,prefetch:e,remote:f}}(),i=(window.Bloodhound=function(){function c(b){b&&(b.local||b.prefetch||b.remote)||a.error("one of local, prefetch, or remote is required"),this.limit=b.limit||5,this.sorter=d(b.sorter),this.dupDetector=b.dupDetector||i,this.local=h.local(b),this.prefetch=h.prefetch(b),this.remote=h.remote(b),this.cacheKey=this.prefetch?this.prefetch.cacheKey||this.prefetch.url:null,this.index=new g({datumTokenizer:b.datumTokenizer,queryTokenizer:b.queryTokenizer}),this.storage=this.cacheKey?new e(this.cacheKey):null}function d(a){function c(b){return b.sort(a)}function d(a){return a}return b.isFunction(a)?c:d}function i(){return!1}var j;return j={data:"data",protocol:"protocol",thumbprint:"thumbprint"},c.tokenizers={whitespace:function(a){return a.split(/\s+/)},nonword:function(a){return a.split(/\W+/)}},b.mixin(c.prototype,{_loadPrefetch:function(b){function c(a){var c;c=b.filter?b.filter(a):a,f.add(c),f._saveToStorage(f.index.serialize(),b.thumbprint,b.ttl)}var d,e,f=this;return(d=this._readFromStorage(b.thumbprint))?(this.index.bootstrap(d),e=a.Deferred().resolve()):e=a.ajax(b.url,b.ajax).done(c),e},_getFromRemote:function(a,b){function c(a){var c=f.remote.filter?f.remote.filter(a):a;b(c)}var d,e,f=this;return a=a||"",e=encodeURIComponent(a),d=this.remote.replace?this.remote.replace(this.remote.url,a):this.remote.url.replace(this.remote.wildcard,e),this.transport.get(d,this.remote.ajax,c)},_saveToStorage:function(a,b,c){this.storage&&(this.storage.set(j.data,a,c),this.storage.set(j.protocol,location.protocol,c),this.storage.set(j.thumbprint,b,c))},_readFromStorage:function(a){var b,c={};return this.storage&&(c.data=this.storage.get(j.data),c.protocol=this.storage.get(j.protocol),c.thumbprint=this.storage.get(j.thumbprint)),b=c.thumbprint!==a||c.protocol!==location.protocol,c.data&&!b?c.data:null},initialize:function(){function b(){d.add(d.local)}var c,d=this;return c=this.prefetch?this._loadPrefetch(this.prefetch):a.Deferred().resolve(),this.local&&c.done(b),this.transport=this.remote?new f(this.remote):null,this.initialize=function(){return c.promise()},c.promise()},add:function(a){this.index.add(a)},get:function(a,c){function d(a){var d=e.slice(0);b.each(a,function(a){var c;return c=b.some(d,function(b){return f.dupDetector(a,b)}),!c&&d.push(a),d.length',dropdown:'',dataset:'
',suggestions:'',suggestion:'
%BODY%
'}),j={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},dropdown:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},suggestions:{display:"block"},suggestion:{whiteSpace:"nowrap",cursor:"pointer"},suggestionChild:{whiteSpace:"normal"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}};b.isMsie()&&b.mixin(j.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),b.isMsie()&&b.isMsie()<=7&&b.mixin(j.input,{marginTop:"-1px"});var k=function(){function c(b){b&&b.el||a.error("EventBus initialized without el"),this.$el=a(b.el)}var d="typeahead:";return b.mixin(c.prototype,{trigger:function(a){var b=[].slice.call(arguments,1);this.$el.trigger(d+a,b)}}),c}(),l=function(){function a(a,b,c,d){var e;if(!c)return this;for(b=b.split(i),c=d?h(c,d):c,this._callbacks=this._callbacks||{};e=b.shift();)this._callbacks[e]=this._callbacks[e]||{sync:[],async:[]},this._callbacks[e][a].push(c);return this}function b(b,c,d){return a.call(this,"async",b,c,d)}function c(b,c,d){return a.call(this,"sync",b,c,d)}function d(a){var b;if(!this._callbacks)return this;for(a=a.split(i);b=a.shift();)delete this._callbacks[b];return this}function e(a){var b,c,d,e,g;if(!this._callbacks)return this;for(a=a.split(i),d=[].slice.call(arguments,1);(b=a.shift())&&(c=this._callbacks[b]);)e=f(c.sync,this,[b].concat(d)),g=f(c.async,this,[b].concat(d)),e()&&j(g);return this}function f(a,b,c){function d(){for(var d,e=0;!d&&e