Merge branch 'lars' into 'master'

Lars

See merge request !135
This commit was merged in pull request #139.
This commit is contained in:
Lars van Hijfte
2017-01-26 22:37:19 +01:00
4 changed files with 20 additions and 3 deletions

View File

@@ -275,3 +275,16 @@ div[data-title]:hover:after {
display: inline-block;
vertical-align: middle;
}
::-webkit-scrollbar {
width: 5px;
height: 5px;
}
::-webkit-scrollbar-track {
background: none;
}
::-webkit-scrollbar-thumb {
-webkit-border-radius: 20px;
border-radius: 20px;
background: #4CAF50;
}

View File

@@ -30,6 +30,7 @@ div.posts div.post {
width: calc(100% - 40px);
cursor: pointer;
transition-duration: 250ms;
word-wrap: break-word;
}
div.posts div.post:hover {

View File

@@ -30,6 +30,7 @@ function getOldChatMessages($user2ID) {
}
function sendMessage($destination, $content) {
require_once("friendship.php");
if (getFriendshipStatus($destination) == 1) {
$stmt = $GLOBALS["db"]->prepare("
INSERT INTO
@@ -58,7 +59,8 @@ function sendMessage($destination, $content) {
}
function getNewChatMessages($lastID, $destination) {
if (getFriendshipStatus($user2ID) == 1) {
require_once("friendship.php");
if (getFriendshipStatus($destination) == 1) {
$stmt = $GLOBALS["db"]->prepare("
SELECT
*
@@ -91,13 +93,13 @@ function getNewChatMessages($lastID, $destination) {
function selectAllUnreadChat() {
$stmt = $GLOBALS["db"]->prepare("
SELECT
LEFT(CONCAT(`user`.`fname`, ' ', `user`.`lname`), 15) as `fullname`,
LEFT(CONCAT(`user`.`fname`, ' ', `user`.`lname`), 15) AS `fullname`,
`user`.`userID`,
IFNULL(
`profilepicture`,
'../img/avatar-standard.png'
) AS profilepicture,
LEFT(`private_message`.`content`, 15) as `content`
LEFT(`private_message`.`content`, 15) AS `content`
FROM
`private_message`,
`friendship`,

View File

@@ -74,6 +74,7 @@
name="content"
id="newContent"
placeholder="Schrijf een bericht..."
autocomplete="off"
autofocus
required
/>