From c4d78e54bc719f42c4f1e25329bb288bf9524cf1 Mon Sep 17 00:00:00 2001 From: Hendrik Date: Thu, 19 Jan 2017 11:08:45 +0100 Subject: [PATCH 001/256] fixed form with get, fix accompanying css --- website/public/styles/adminpanel.css | 8 +++--- website/views/adminpanel.php | 42 +++++++++++++--------------- 2 files changed, 23 insertions(+), 27 deletions(-) diff --git a/website/public/styles/adminpanel.css b/website/public/styles/adminpanel.css index d5b740e..e684714 100644 --- a/website/public/styles/adminpanel.css +++ b/website/public/styles/adminpanel.css @@ -22,6 +22,10 @@ box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); } +.admin-searchform { + display: inline-block; +} + .admin-searchbar { display: inline-block; margin: 10px; @@ -44,10 +48,6 @@ width: 120px; } -.admin-groupfilter { - display: none; -} - .admin-users { margin: 10px; } diff --git a/website/views/adminpanel.php b/website/views/adminpanel.php index 5a3ba97..ea9cea6 100644 --- a/website/views/adminpanel.php +++ b/website/views/adminpanel.php @@ -43,23 +43,24 @@ $listnr = 0; // TODO: add page functionality $status = $groupstatus = array(); $pagetype = "user"; +if (!empty($_GET["search"])) { + $search = test_input($_GET["search"]); +} + +if (!empty($_GET["pagetype"])) { + $pagetype = test_input($_GET["pagetype"]); +} + +if (!empty($_GET["status"])) { + $status = $_GET["status"]; +} + +if (!empty($_GET["groupstatus"])) { + $groupstatus = $_GET["groupstatus"]; +} + + if ($_SERVER["REQUEST_METHOD"] == "POST") { - if (!empty($_POST["search"])) { - $search = test_input($_POST["search"]); - } - - if (!empty($_POST["pagetype"])) { - $pagetype = test_input($_POST["pagetype"]); - } - - if (!empty($_POST["status"])) { - $status = $_POST["status"]; - } - - if (!empty($_POST["groupstatus"])) { - $groupstatus = $_POST["groupstatus"]; - } - if (!empty($_POST["actions"]) && !empty($_POST["userID"])) { changeUserStatusByID($db, $_POST["userID"], $_POST["actions"]); } elseif (!empty($_POST["actions"]) && !empty($_POST["groupID"])) { @@ -81,13 +82,10 @@ function test_input($data) {

User Management Panel


-
" - method="post">
" - method="post"> + method="get"> -
-            
         
-- 2.49.1 From 4c9223cba2b2f7bb835d64e3b1dd5078d22267a8 Mon Sep 17 00:00:00 2001 From: Hendrik Date: Thu, 19 Jan 2017 12:57:10 +0100 Subject: [PATCH 002/256] add user and group batch change --- website/public/styles/adminpanel.css | 2 +- website/queries/group_page.php | 16 ++++++ website/queries/user.php | 16 ++++++ website/views/adminpanel.php | 80 +++++++++++++++++++++------- 4 files changed, 94 insertions(+), 20 deletions(-) diff --git a/website/public/styles/adminpanel.css b/website/public/styles/adminpanel.css index e684714..85921b7 100644 --- a/website/public/styles/adminpanel.css +++ b/website/public/styles/adminpanel.css @@ -13,7 +13,7 @@ height: auto; } -.admin-actions { +.admin-batchactions, .admin-groupbatchactions { display: inline-block; padding: 8px; vertical-align: top; diff --git a/website/queries/group_page.php b/website/queries/group_page.php index c6db01b..e0c8f17 100644 --- a/website/queries/group_page.php +++ b/website/queries/group_page.php @@ -94,6 +94,22 @@ function changeGroupStatusByID($db, $id, $status) { } +function changeMultipleGroupStatusByID($db, $ids, $status) { + $q = $db->prepare(" + UPDATE + `group_page` + SET + `status` = :status + WHERE + FIND_IN_SET (`groupID`, :ids) + "); + + $ids = implode(',', $ids); + $q->bindParam(':ids', $ids); + $q->bindParam(':status', $status); + $q->execute(); + return $q; +} ?> diff --git a/website/queries/user.php b/website/queries/user.php index bfd9579..d0d81bd 100644 --- a/website/queries/user.php +++ b/website/queries/user.php @@ -82,5 +82,21 @@ function changeUserStatusByID($db, $id, $status) { return $q; } +function changeMultipleUserStatusByID($db, $ids, $status) { + $q = $db->prepare(" + UPDATE + `user` + SET + `role` = :status + WHERE + FIND_IN_SET (`userID`, :ids) + "); + + $ids = implode(',', $ids); + $q->bindParam(':ids', $ids); + $q->bindParam(':status', $status); + $q->execute(); + return $q; +} ?> diff --git a/website/views/adminpanel.php b/website/views/adminpanel.php index ea9cea6..8b0990c 100644 --- a/website/views/adminpanel.php +++ b/website/views/adminpanel.php @@ -9,7 +9,7 @@ }; function checkAll(allbox) { - var checkboxes = document.getElementsByName('checkbox-user[]'); + var checkboxes = document.getElementsByClassName('checkbox-list'); for (var i = 0; i < checkboxes.length; i++) { if (checkboxes[i].type == 'checkbox') { @@ -22,9 +22,15 @@ if (document.getElementById('group').checked) { document.getElementById('admin-filter').style.display = 'none'; document.getElementById('admin-groupfilter').style.display = 'inline-block'; + + document.getElementById('admin-batchactions').style.display = 'none'; + document.getElementById('admin-groupbatchactions').style.display = 'inline-block'; } else { document.getElementById('admin-filter').style.display = 'inline-block'; document.getElementById('admin-groupfilter').style.display = 'none'; + + document.getElementById('admin-batchactions').style.display = 'inline-block'; + document.getElementById('admin-groupbatchactions').style.display = 'none'; } } @@ -43,30 +49,40 @@ $listnr = 0; // TODO: add page functionality $status = $groupstatus = array(); $pagetype = "user"; -if (!empty($_GET["search"])) { +if (isset($_GET["search"])) { $search = test_input($_GET["search"]); } -if (!empty($_GET["pagetype"])) { +if (isset($_GET["pagetype"])) { $pagetype = test_input($_GET["pagetype"]); } -if (!empty($_GET["status"])) { +if (isset($_GET["status"])) { $status = $_GET["status"]; } -if (!empty($_GET["groupstatus"])) { +if (isset($_GET["groupstatus"])) { $groupstatus = $_GET["groupstatus"]; } if ($_SERVER["REQUEST_METHOD"] == "POST") { - if (!empty($_POST["actions"]) && !empty($_POST["userID"])) { + if (isset($_POST["actions"]) && isset($_POST["userID"])) { changeUserStatusByID($db, $_POST["userID"], $_POST["actions"]); - } elseif (!empty($_POST["actions"]) && !empty($_POST["groupID"])) { + } + + if (isset($_POST["actions"]) && isset($_POST["groupID"])) { changeGroupStatusByID($db, $_POST["groupID"], $_POST["actions"]); } + if (isset($_POST["batchactions"]) && isset($_POST["checkbox-user"])) { + changeMultipleUserStatusByID($db, $_POST["checkbox-user"], $_POST["batchactions"]); + } + + if (isset($_POST["groupbatchactions"]) && isset($_POST["checkbox-group"])) { + changeMultipleGroupStatusByID($db, $_POST["checkbox-group"], $_POST["groupbatchactions"]); + } + } function test_input($data) { @@ -145,15 +161,36 @@ function test_input($data) { -
+

Batch Actions:

- -
- -
- -

- +
+ +
+ +
+ +

+ +
+
+ +
+

Batch Actions:

+
+ +
+ +
+ +

+ +

@@ -194,7 +231,9 @@ function test_input($data) { + class='checkbox-list' + value='$userID' + form='admin-batchform'> $username $role @@ -223,13 +262,15 @@ function test_input($data) { $name = $group['name']; $role = $group['status']; $description = $group['description']; - $thispage = htmlspecialchars($_SERVER['PHP_SELF']); + $thispage = htmlspecialchars(basename($_SERVER['REQUEST_URI'])); echo(" + class='checkbox-list' + value='$groupID' + form='admin-groupbatchform'> $name $role @@ -241,7 +282,7 @@ function test_input($data) { @@ -255,6 +296,7 @@ function test_input($data) {
+            
         
-- 2.49.1 From 1640d38baac03a31d8272461a96b287ba17655ca Mon Sep 17 00:00:00 2001 From: Hendrik Date: Thu, 19 Jan 2017 16:29:38 +0100 Subject: [PATCH 003/256] add user page functionality --- website/queries/user.php | 51 ++++++++++++++++++++++++++++ website/views/adminpanel.php | 65 +++++++++++++++++++++++++++++++----- 2 files changed, 107 insertions(+), 9 deletions(-) diff --git a/website/queries/user.php b/website/queries/user.php index d0d81bd..9b05511 100644 --- a/website/queries/user.php +++ b/website/queries/user.php @@ -69,6 +69,57 @@ function search20UsersFromNByStatus($db, $n, $keyword, $status) { return $q; } +function searchSomeUsersByStatus($db, $n, $m, $keyword, $status) { + $q = $db->prepare(" + SELECT + `userID`, + `username`, + `role`, + `bancomment` + FROM + `user` + WHERE + `username` LIKE :keyword AND + FIND_IN_SET (`role`, :statuses) + ORDER BY + `role`, + `username` + LIMIT + :n, :m + "); + + $keyword = "%$keyword%"; + $q->bindParam(':keyword', $keyword); + $q->bindParam(':n', $n, PDO::PARAM_INT); + $q->bindParam(':m', $m, PDO::PARAM_INT); + $statuses = implode(',', $status); + $q->bindParam(':statuses', $statuses); + $q->execute(); + return $q; +} + +function countSomeUsersByStatus($db, $keyword, $status) { + $q = $db->prepare(" + SELECT + COUNT(*) + FROM + `user` + WHERE + `username` LIKE :keyword AND + FIND_IN_SET (`role`, :statuses) + ORDER BY + `role`, + `username` + "); + + $keyword = "%$keyword%"; + $q->bindParam(':keyword', $keyword); + $statuses = implode(',', $status); + $q->bindParam(':statuses', $statuses); + $q->execute(); + return $q; +} + function changeUserStatusByID($db, $id, $status) { $q = $db->query(" UPDATE diff --git a/website/views/adminpanel.php b/website/views/adminpanel.php index 8b0990c..637bf56 100644 --- a/website/views/adminpanel.php +++ b/website/views/adminpanel.php @@ -18,6 +18,23 @@ } } + function checkCheckAll(allbox) { + var checkboxes = document.getElementsByClassName('checkbox-list'); + var checked = true; + + for (var i = 0; i < checkboxes.length; i++) { + if (checkboxes[i].type == 'checkbox') { + if (checkboxes[i].checked == false) { + checked = false; + break; + } + } + } + + document.write(checked); + allbox.checked = checked; + } + function changeFilter() { if (document.getElementById('group').checked) { document.getElementById('admin-filter').style.display = 'none'; @@ -45,7 +62,10 @@ Users:
+

Showing results + fetchColumn(); + $mincount = min($listm, $countresults); + echo "$listn to $mincount out of $countresults"; ?>


- 1 / 1 +
+ +

@@ -217,8 +263,11 @@ function test_input($data) { fetch(PDO::FETCH_ASSOC)) { $userID = $user['userID']; @@ -233,7 +282,8 @@ function test_input($data) { name='checkbox-user[]' class='checkbox-list' value='$userID' - form='admin-batchform'> + form='admin-batchform' + onchange='checkCheckAll(document.getElementById('checkall'))'> @@ -255,7 +305,7 @@ function test_input($data) { "); } } else { - $q = search20GroupsFromNByStatus($db, $listnr, $search, $groupstatus); + $q = search20GroupsFromNByStatus($db, $listn, $search, $groupstatus); while ($group = $q->fetch(PDO::FETCH_ASSOC)) { $groupID = $group['groupID']; @@ -295,9 +345,6 @@ function test_input($data) { ?>
- + User Status $username $role
-
-            
-        
-- 2.49.1 From e0d02d283de79c8238bed1951af6eeb2a563a2ad Mon Sep 17 00:00:00 2001 From: Hendrik Date: Thu, 19 Jan 2017 16:42:45 +0100 Subject: [PATCH 004/256] add page functionality for groups --- website/queries/group_page.php | 49 ++++++++++++++++++++++++++++++++++ website/views/adminpanel.php | 20 +++++++++----- 2 files changed, 62 insertions(+), 7 deletions(-) diff --git a/website/queries/group_page.php b/website/queries/group_page.php index e0c8f17..64a048a 100644 --- a/website/queries/group_page.php +++ b/website/queries/group_page.php @@ -80,6 +80,55 @@ function search20GroupsFromNByStatus($db, $n, $keyword, $status) { return $q; } +function searchSomeGroupsByStatus($db, $n, $m, $keyword, $status) { + $q = $db->prepare(" + SELECT + `groupID`, + `name`, + `status`, + `description` + FROM + `group_page` + WHERE + `name` LIKE :keyword AND + FIND_IN_SET (`status`, :statuses) + ORDER BY + `name` + LIMIT + :n, :m + "); + + $keyword = "%$keyword%"; + $q->bindParam(':keyword', $keyword); + $q->bindParam(':n', $n, PDO::PARAM_INT); + $q->bindParam(':m', $m, PDO::PARAM_INT); + $statuses = implode(',', $status); + $q->bindParam(':statuses', $statuses); + $q->execute(); + return $q; +} + +function countSomeGroupsByStatus($db, $keyword, $status) { + $q = $db->prepare(" + SELECT + COUNT(*) + FROM + `group_page` + WHERE + `name` LIKE :keyword AND + FIND_IN_SET (`status`, :statuses) + ORDER BY + `name` + "); + + $keyword = "%$keyword%"; + $q->bindParam(':keyword', $keyword); + $statuses = implode(',', $status); + $q->bindParam(':statuses', $statuses); + $q->execute(); + return $q; +} + function changeGroupStatusByID($db, $id, $status) { $q = $db->query(" UPDATE diff --git a/website/views/adminpanel.php b/website/views/adminpanel.php index 637bf56..925a681 100644 --- a/website/views/adminpanel.php +++ b/website/views/adminpanel.php @@ -62,8 +62,6 @@

Showing results - fetchColumn(); $mincount = min($listm, $countresults); echo "$listn to $mincount out of $countresults"; ?>


@@ -237,7 +243,7 @@ function test_input($data) { onchange="this.form.submit()" value=""> $i"; } else { @@ -263,8 +269,8 @@ function test_input($data) { fetch(PDO::FETCH_ASSOC)) { $groupID = $group['groupID']; -- 2.49.1 From db2fb1b353ce77ddf9ee5f39dc8c0ef8071c14b4 Mon Sep 17 00:00:00 2001 From: Joey Lai Date: Fri, 20 Jan 2017 11:51:50 +0100 Subject: [PATCH 005/256] added checked already logged in function --- website/public/login.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/website/public/login.php b/website/public/login.php index c78b3ca..fdac086 100644 --- a/website/public/login.php +++ b/website/public/login.php @@ -10,6 +10,10 @@ + + + -- 2.49.1 From dfc04be8b6c13b6df70aa16817f8960ba34df4d3 Mon Sep 17 00:00:00 2001 From: Joey Lai Date: Fri, 20 Jan 2017 11:56:30 +0100 Subject: [PATCH 006/256] added script to window.onload --- website/public/login.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/public/login.php b/website/public/login.php index fdac086..086e1c6 100644 --- a/website/public/login.php +++ b/website/public/login.php @@ -11,7 +11,9 @@ session_start(); if(isset($_SESSION["userID"])){ + } // Define variables and set to empty values -- 2.49.1 From 66e4fa189c559f978e88eab059aef927dd1e5ca1 Mon Sep 17 00:00:00 2001 From: Joey Lai Date: Fri, 20 Jan 2017 11:58:33 +0100 Subject: [PATCH 007/256] added echo --- website/public/login.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/public/login.php b/website/public/login.php index 086e1c6..36e6c7d 100644 --- a/website/public/login.php +++ b/website/public/login.php @@ -11,9 +11,9 @@ session_start(); if(isset($_SESSION["userID"])){ - + " } // Define variables and set to empty values -- 2.49.1 From 44bbbfeaaef03a66a3ad837d3dc8f3ea6dcd669f Mon Sep 17 00:00:00 2001 From: Joey Lai Date: Fri, 20 Jan 2017 12:01:27 +0100 Subject: [PATCH 008/256] fixed ; --- website/public/login.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/public/login.php b/website/public/login.php index 36e6c7d..65babdf 100644 --- a/website/public/login.php +++ b/website/public/login.php @@ -12,8 +12,8 @@ if(isset($_SESSION["userID"])){ echo "" + window.onload=checkLoggedIn(); + "; } // Define variables and set to empty values -- 2.49.1 From 3152839dae104cc90a56642de543173bb49d8cc9 Mon Sep 17 00:00:00 2001 From: Hendrik Date: Fri, 20 Jan 2017 12:06:23 +0100 Subject: [PATCH 009/256] add javascript for userlist tablehead checkall box, fix pageselector css --- website/public/styles/adminpanel.css | 12 +++-- website/views/adminpanel.php | 79 +++++++++++++++------------- 2 files changed, 52 insertions(+), 39 deletions(-) diff --git a/website/public/styles/adminpanel.css b/website/public/styles/adminpanel.css index 85921b7..b226cd3 100644 --- a/website/public/styles/adminpanel.css +++ b/website/public/styles/adminpanel.css @@ -52,10 +52,16 @@ margin: 10px; } -.admin-userpage { - width: 170px; - margin-bottom: 20px; +.admin-userheading { + width: auto; + float: left; +} + +.admin-pageui { + text-align: right; float: right; + width: auto; + margin-bottom: 20px; } .usertitle { diff --git a/website/views/adminpanel.php b/website/views/adminpanel.php index 925a681..52681a4 100644 --- a/website/views/adminpanel.php +++ b/website/views/adminpanel.php @@ -30,8 +30,6 @@ } } } - - document.write(checked); allbox.checked = checked; } @@ -221,39 +219,45 @@ function test_input($data) {
-

Users:

- -
-

Showing results - fetchColumn(); - $mincount = min($listm, $countresults); - echo "$listn to $mincount out of $countresults"; ?>


- -
- + $i"; + } else { + echo ""; + } } - } - ?> - -
- + ?> + + +

+ +


@@ -281,6 +285,7 @@ function test_input($data) { $role = $user['role']; $bancomment = $user['bancomment']; $thispage = htmlspecialchars(basename($_SERVER['REQUEST_URI'])); + $function = "checkCheckAll(document.getElementById('checkall'))"; echo(" @@ -289,7 +294,7 @@ function test_input($data) { class='checkbox-list' value='$userID' form='admin-batchform' - onchange='checkCheckAll(document.getElementById('checkall'))'> + onchange=" . "$function" . "> @@ -319,6 +324,7 @@ function test_input($data) { $role = $group['status']; $description = $group['description']; $thispage = htmlspecialchars(basename($_SERVER['REQUEST_URI'])); + $function = "checkCheckAll(document.getElementById('checkall'))"; echo(" @@ -326,7 +332,8 @@ function test_input($data) { name='checkbox-group[]' class='checkbox-list' value='$groupID' - form='admin-groupbatchform'> + form='admin-groupbatchform' + onchange=" . "$function" . "> -- 2.49.1 From 142bae139b8ca9ee93329aae1c2fb28c0d49e84d Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Fri, 20 Jan 2017 12:14:05 +0100 Subject: [PATCH 010/256] Profile will now show the current users page when a username is not given in a get request. --- website/public/profile.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/website/public/profile.php b/website/public/profile.php index e35935b..f3f499b 100644 --- a/website/public/profile.php +++ b/website/public/profile.php @@ -42,12 +42,11 @@ function nicetime($date) { } if(empty($_GET["username"])) { - echo "User does not exist!"; - return; + $userID = $_SESSION["userID"]; +} else { + $userID = getUserID($_GET["username"]); } -$userID = getUserID($_GET["username"]); - $user = selectUser($userID); $profile_friends = selectAllFriends($userID); $profile_groups = selectAllUserGroups($userID); -- 2.49.1 From 50cec9beede427dc4455b9e1851e8e7e242a2a5a Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Fri, 20 Jan 2017 12:25:18 +0100 Subject: [PATCH 011/256] Added things to the menu. Extra item for a random friend, If you have no groups, it has a message. --- website/public/styles/menu.css | 2 +- website/queries/user.php | 28 ++++++++++++++++- website/views/head.php | 21 +++++++------ website/views/menu.php | 56 ++++++++++++++++++++++++++-------- 4 files changed, 82 insertions(+), 25 deletions(-) diff --git a/website/public/styles/menu.css b/website/public/styles/menu.css index 6cdae65..4d4b8bb 100644 --- a/website/public/styles/menu.css +++ b/website/public/styles/menu.css @@ -30,7 +30,7 @@ cursor: pointer; } -.friend-item:hover { +.friend-item:hover, .group-item:hover { background: #845663; color: white; } diff --git a/website/queries/user.php b/website/queries/user.php index d5fea1b..f33968f 100644 --- a/website/queries/user.php +++ b/website/queries/user.php @@ -169,4 +169,30 @@ function changeUserStatusByID($id, $status) { } -?> +function selectRandomNotFriendUser($userID) { + $stmt = $GLOBALS["db"]->prepare(" + SELECT + `user`.`username` + FROM + `user` + WHERE + `userID` NOT IN (SELECT + `user1ID` + FROM + `friendship` + WHERE `user1ID` = :userID) OR + `userID` NOT IN (SELECT + `user2ID` + FROM + `friendship` + WHERE `user2ID` = :userID) + ORDER BY + RAND() + LIMIT + 1 + "); + + $stmt->bindParam(':userID', $userID, PDO::PARAM_INT); + $stmt->execute(); + return $stmt->fetch(); +} \ No newline at end of file diff --git a/website/views/head.php b/website/views/head.php index d9a985a..e267d61 100644 --- a/website/views/head.php +++ b/website/views/head.php @@ -1,21 +1,22 @@ MyHyvesbook+ - - - - + + + + "; } + + $randomUser = selectRandomNotFriendUser($_SESSION["userID"])["username"]; + + echo " +
  • +
    + + +
  • + "; if ($i > 1) { $i -= 1; echo " -
  • - En nog $i anderen... -
  • "; +
  • + En nog $i anderen... +
  • + "; } + ?> @@ -87,17 +106,28 @@ // Echo the friend. echo " - -
  • -
    - PF - $name -
    -
  • -
    +
  • +
    + + +
  • "; } - if ($i > 3) { + + if ($i == 0) { + echo "
  • +
    + Je hoort nergens bij. +
    +
  • "; + } else if ($i > 3) { $i -= 3; echo "
  • -- 2.49.1 From daff2f41faf4b0f8b7def9edc294aace9976f068 Mon Sep 17 00:00:00 2001 From: Hendrik Date: Fri, 20 Jan 2017 12:29:34 +0100 Subject: [PATCH 012/256] minor fix --- website/views/adminpanel.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/website/views/adminpanel.php b/website/views/adminpanel.php index 86c674a..52681a4 100644 --- a/website/views/adminpanel.php +++ b/website/views/adminpanel.php @@ -99,15 +99,8 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { changeMultipleGroupStatusByID($db, $_POST["checkbox-group"], $_POST["groupbatchactions"]); } -<<<<<<< HEAD if (isset($_POST["pageselect"])) { $currentpage = $_POST["pageselect"]; -======= - if (!empty($_POST["actions"]) && !empty($_POST["userID"])) { - changeUserStatusByID($_POST["userID"], $_POST["actions"]); - } elseif (!empty($_POST["actions"]) && !empty($_POST["groupID"])) { - changeGroupStatusByID($_POST["groupID"], $_POST["actions"]); ->>>>>>> master } } -- 2.49.1 From eb1fc154015d8477041aee70a05c2561f8983196 Mon Sep 17 00:00:00 2001 From: Joey Lai Date: Fri, 20 Jan 2017 12:32:39 +0100 Subject: [PATCH 013/256] script on right lines --- website/public/login.php | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/website/public/login.php b/website/public/login.php index 65babdf..3d37da7 100644 --- a/website/public/login.php +++ b/website/public/login.php @@ -7,6 +7,18 @@ include_once("../queries/checkInput.php") ?> + + - - - -- 2.49.1 From 6c41e825fe4527ca83949d647183d70eb34466c4 Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Fri, 20 Jan 2017 12:53:23 +0100 Subject: [PATCH 014/256] Removed absolute path --- website/views/head.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/website/views/head.php b/website/views/head.php index e267d61..bb6eec4 100644 --- a/website/views/head.php +++ b/website/views/head.php @@ -1,17 +1,17 @@ MyHyvesbook+ - - - - + + + + Date: Fri, 20 Jan 2017 12:58:34 +0100 Subject: [PATCH 015/256] fix queries for global and prepared --- website/queries/group_page.php | 43 ++++++++++++++++++++-------------- website/queries/user.php | 29 ++++++++++++++--------- website/views/adminpanel.php | 16 ++++++------- 3 files changed, 52 insertions(+), 36 deletions(-) diff --git a/website/queries/group_page.php b/website/queries/group_page.php index 44d346c..ef7af07 100644 --- a/website/queries/group_page.php +++ b/website/queries/group_page.php @@ -1,7 +1,7 @@ query(" + $q = $GLOBALS["db"]->prepare(" SELECT `group_page`.`name`, `group_page`.`picture`, @@ -11,12 +11,16 @@ function selectGroupById($groupID) { FROM `group_page` WHERE - `group_page`.`groupID` = $groupID + `group_page`.`groupID` = :groupID "); + + $q->bindParam(':groupID', $groupID); + $q->execute(); + return $q; } function select20GroupsFromN($n) { - return $GLOBALS["db"]->query(" + $q = $GLOBALS["db"]->prepare(" SELECT `group_page`.`groupID`, `group_page`.`name`, @@ -29,12 +33,16 @@ function select20GroupsFromN($n) { ORDER BY `group_page`.`name` ASC LIMIT - $n, 20 + :n, 20 "); + + $q->bindParam(':n', $n); + $q->execute(); + return $q; } function select20GroupsByStatusFromN($n, $status) { - return $GLOBALS["db"]->query(" + $q = $GLOBALS["db"]->prepare(" SELECT `group_page`.`groupID`, `group_page`.`name`, @@ -45,12 +53,17 @@ function select20GroupsByStatusFromN($n, $status) { FROM `group_page` WHERE - `group_page`.`status` = $status + `group_page`.`status` = :status ORDER BY `group_page`.`name` ASC LIMIT - $n, 20 + :n, 20 "); + + $q->bindParam(':status', $status); + $q->bindParam(':n', $n); + $q->execute(); + return $q; } function search20GroupsFromNByStatus($n, $keyword, $status) { @@ -80,8 +93,8 @@ function search20GroupsFromNByStatus($n, $keyword, $status) { return $q; } -function searchSomeGroupsByStatus($db, $n, $m, $keyword, $status) { - $q = $db->prepare(" +function searchSomeGroupsByStatus($n, $m, $keyword, $status) { + $q = $GLOBALS['db']->prepare(" SELECT `groupID`, `name`, @@ -108,8 +121,8 @@ function searchSomeGroupsByStatus($db, $n, $m, $keyword, $status) { return $q; } -function countSomeGroupsByStatus($db, $keyword, $status) { - $q = $db->prepare(" +function countSomeGroupsByStatus($keyword, $status) { + $q = $GLOBALS['db']->prepare(" SELECT COUNT(*) FROM @@ -141,11 +154,9 @@ function changeGroupStatusByID($id, $status) { return $q; } -<<<<<<< HEAD - -function changeMultipleGroupStatusByID($db, $ids, $status) { - $q = $db->prepare(" +function changeMultipleGroupStatusByID($ids, $status) { + $q = $GLOBALS['db']->prepare(" UPDATE `group_page` SET @@ -163,5 +174,3 @@ function changeMultipleGroupStatusByID($db, $ids, $status) { ?> -======= ->>>>>>> master diff --git a/website/queries/user.php b/website/queries/user.php index 71cef11..719a40f 100644 --- a/website/queries/user.php +++ b/website/queries/user.php @@ -87,7 +87,7 @@ function selectAllUserPosts($userID) { } function select20UsersFromN($n) { - return $GLOBALS["db"]->query(" + $q = $GLOBALS["db"]->prepare(" SELECT `userID`, `username`, @@ -99,8 +99,12 @@ function select20UsersFromN($n) { `role`, `username` LIMIT - $n, 20 + :n, 20 "); + + $q->bindParam(':n', $n); + $q->execute(); + return $q; } function search20UsersFromN($n, $keyword) { @@ -155,8 +159,8 @@ function search20UsersFromNByStatus($n, $keyword, $status) { return $q; } -function searchSomeUsersByStatus($db, $n, $m, $keyword, $status) { - $q = $db->prepare(" +function searchSomeUsersByStatus($n, $m, $keyword, $status) { + $q = $GLOBALS["db"]->prepare(" SELECT `userID`, `username`, @@ -184,8 +188,8 @@ function searchSomeUsersByStatus($db, $n, $m, $keyword, $status) { return $q; } -function countSomeUsersByStatus($db, $keyword, $status) { - $q = $db->prepare(" +function countSomeUsersByStatus($keyword, $status) { + $q = $GLOBALS["db"]->prepare(" SELECT COUNT(*) FROM @@ -208,20 +212,23 @@ function countSomeUsersByStatus($db, $keyword, $status) { function changeUserStatusByID($id, $status) { - $q = $GLOBALS["db"]->query(" + $q = $GLOBALS["db"]->prepare(" UPDATE `user` SET - `role` = $status + `role` = :status WHERE - `userID` = $id + `userID` = :id "); + $q->bindParam(':status', $status); + $q->bindParam(':id', $id); + $q->execute(); return $q; } -function changeMultipleUserStatusByID($db, $ids, $status) { - $q = $db->prepare(" +function changeMultipleUserStatusByID($ids, $status) { + $q = $GLOBALS["db"]->prepare(" UPDATE `user` SET diff --git a/website/views/adminpanel.php b/website/views/adminpanel.php index 52681a4..af23dae 100644 --- a/website/views/adminpanel.php +++ b/website/views/adminpanel.php @@ -84,19 +84,19 @@ if (isset($_GET["groupstatus"])) { if ($_SERVER["REQUEST_METHOD"] == "POST") { if (isset($_POST["actions"]) && isset($_POST["userID"])) { - changeUserStatusByID($db, $_POST["userID"], $_POST["actions"]); + changeUserStatusByID($_POST["userID"], $_POST["actions"]); } if (isset($_POST["actions"]) && isset($_POST["groupID"])) { - changeGroupStatusByID($db, $_POST["groupID"], $_POST["actions"]); + changeGroupStatusByID($_POST["groupID"], $_POST["actions"]); } if (isset($_POST["batchactions"]) && isset($_POST["checkbox-user"])) { - changeMultipleUserStatusByID($db, $_POST["checkbox-user"], $_POST["batchactions"]); + changeMultipleUserStatusByID($_POST["checkbox-user"], $_POST["batchactions"]); } if (isset($_POST["groupbatchactions"]) && isset($_POST["checkbox-group"])) { - changeMultipleGroupStatusByID($db, $_POST["checkbox-group"], $_POST["groupbatchactions"]); + changeMultipleGroupStatusByID($_POST["checkbox-group"], $_POST["groupbatchactions"]); } if (isset($_POST["pageselect"])) { @@ -226,9 +226,9 @@ function test_input($data) {
    fetchColumn(); $mincount = min($listm, $countresults); @@ -277,7 +277,7 @@ function test_input($data) { $listm = $currentpage * $perpage; if ($pagetype == 'user') { - $q = searchSomeUsersByStatus($db, $listn, $listm, $search, $status); + $q = searchSomeUsersByStatus($listn, $listm, $search, $status); while($user = $q->fetch(PDO::FETCH_ASSOC)) { $userID = $user['userID']; @@ -316,7 +316,7 @@ function test_input($data) { "); } } else { - $q = searchSomeGroupsByStatus($db, $listn, $listm, $search, $groupstatus); + $q = searchSomeGroupsByStatus($listn, $listm, $search, $groupstatus); while ($group = $q->fetch(PDO::FETCH_ASSOC)) { $groupID = $group['groupID']; -- 2.49.1 From bfdf9e989b2a724f505975d9ab79ccef106e937d Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Fri, 20 Jan 2017 13:07:47 +0100 Subject: [PATCH 016/256] Fixed profile page, now shows current user when no username is given in get variable. --- website/public/profile.php | 61 ++++++------------------------------ website/queries/nicetime.php | 39 +++++++++++++++++++++++ 2 files changed, 49 insertions(+), 51 deletions(-) create mode 100644 website/queries/nicetime.php diff --git a/website/public/profile.php b/website/public/profile.php index f3f499b..0fe2feb 100644 --- a/website/public/profile.php +++ b/website/public/profile.php @@ -1,45 +1,16 @@ + + + + + + + $unix_date) { - $difference = $now - $unix_date; - $tense = "geleden"; - } else { - $difference = $unix_date - $now; - $tense = "vanaf nu"; - } - - for($i = 0; $difference >= $lengths[$i] && $i < count($lengths) - 1; $i++) { - $difference /= $lengths[$i]; - } - - $difference = round($difference); - - if($difference != 1) { - $period = $multiple_periods[$i]; - } else { - $period = $single_periods[$i]; - } - - return "$difference $period $tense"; -} +include("../queries/nicetime.php"); if(empty($_GET["username"])) { $userID = $_SESSION["userID"]; @@ -52,18 +23,6 @@ $profile_friends = selectAllFriends($userID); $profile_groups = selectAllUserGroups($userID); $posts = selectAllUserPosts($userID); -?> - - - - - - - - - $unix_date) { +$difference = $now - $unix_date; +$tense = "geleden"; +} else { +$difference = $unix_date - $now; +$tense = "vanaf nu"; +} + +for($i = 0; $difference >= $lengths[$i] && $i < count($lengths) - 1; $i++) { +$difference /= $lengths[$i]; +} + +$difference = round($difference); + +if($difference != 1) { +$period = $multiple_periods[$i]; +} else { +$period = $single_periods[$i]; +} + +return "$difference $period $tense"; +} \ No newline at end of file -- 2.49.1 From 6418b2b679fdaee5f70da8dddf6321989ea5ea5d Mon Sep 17 00:00:00 2001 From: Hendrik Date: Fri, 20 Jan 2017 13:14:28 +0100 Subject: [PATCH 017/256] move js to /js --- website/public/js/admin.js | 44 +++++++++++++++++++++++++++++++ website/views/adminpanel.php | 50 ++---------------------------------- 2 files changed, 46 insertions(+), 48 deletions(-) create mode 100644 website/public/js/admin.js diff --git a/website/public/js/admin.js b/website/public/js/admin.js new file mode 100644 index 0000000..2055123 --- /dev/null +++ b/website/public/js/admin.js @@ -0,0 +1,44 @@ +window.onload = function() { + changeFilter(); +}; + +function checkAll(allbox) { + var checkboxes = document.getElementsByClassName('checkbox-list'); + + for (var i = 0; i < checkboxes.length; i++) { + if (checkboxes[i].type == 'checkbox') { + checkboxes[i].checked = allbox.checked; + } + } +} + +function checkCheckAll(allbox) { + var checkboxes = document.getElementsByClassName('checkbox-list'); + var checked = true; + + for (var i = 0; i < checkboxes.length; i++) { + if (checkboxes[i].type == 'checkbox') { + if (checkboxes[i].checked == false) { + checked = false; + break; + } + } + } + allbox.checked = checked; +} + +function changeFilter() { + if (document.getElementById('group').checked) { + document.getElementById('admin-filter').style.display = 'none'; + document.getElementById('admin-groupfilter').style.display = 'inline-block'; + + document.getElementById('admin-batchactions').style.display = 'none'; + document.getElementById('admin-groupbatchactions').style.display = 'inline-block'; + } else { + document.getElementById('admin-filter').style.display = 'inline-block'; + document.getElementById('admin-groupfilter').style.display = 'none'; + + document.getElementById('admin-batchactions').style.display = 'inline-block'; + document.getElementById('admin-groupbatchactions').style.display = 'none'; + } +} diff --git a/website/views/adminpanel.php b/website/views/adminpanel.php index af23dae..fde8237 100644 --- a/website/views/adminpanel.php +++ b/website/views/adminpanel.php @@ -3,53 +3,7 @@ Admin Panel - + fetchColumn(); $mincount = min($listm, $countresults); -- 2.49.1 From 61c148e127bade2b031d75264504a84754b70200 Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Fri, 20 Jan 2017 13:30:40 +0100 Subject: [PATCH 018/256] Made chat xss prove --- website/public/API/loadMessages.php | 7 +++---- website/public/API/sendMessage.php | 15 +++++++-------- website/public/js/chat.js | 6 +----- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/website/public/API/loadMessages.php b/website/public/API/loadMessages.php index fef9db7..1c6b942 100644 --- a/website/public/API/loadMessages.php +++ b/website/public/API/loadMessages.php @@ -3,11 +3,10 @@ session_start(); require_once("../../queries/connect.php"); require_once("../../queries/private_message.php"); +require_once("../../queries/checkInput.php"); if (isset($_POST["lastID"]) && $_POST["lastID"] != "") { - - echo getNewChatMessages($_POST["lastID"], $_POST["destination"]); - + echo getNewChatMessages(test_input($_POST["lastID"]), test_input($_POST["destination"])); } else { - echo getOldChatMessages($_POST["destination"]); + echo getOldChatMessages(test_input($_POST["destination"])); } \ No newline at end of file diff --git a/website/public/API/sendMessage.php b/website/public/API/sendMessage.php index d1bc758..c5d47d1 100644 --- a/website/public/API/sendMessage.php +++ b/website/public/API/sendMessage.php @@ -3,16 +3,15 @@ session_start(); require_once("../../queries/connect.php"); require_once("../../queries/private_message.php"); +require_once("../../queries/checkInput.php"); -if (isset($_POST["destination"]) && - isset($_POST["content"])) { - - if (sendMessage($_POST["destination"], $_POST["content"])) { - echo $_POST["content"] . " is naar " . $_POST["destination"] . " gestuurd"; +if (!empty(test_input($_POST["destination"])) && + !empty(test_input($_POST["content"]))) { + if (sendMessage(test_input($_POST["destination"]), test_input($_POST["content"]))) { + echo 1; } else { - echo "YOU FAILED!!!"; + echo 0; } - } else { - echo "maybe dont try to hax the system?"; + echo 0; } \ No newline at end of file diff --git a/website/public/js/chat.js b/website/public/js/chat.js index 75eb32e..6c420a1 100644 --- a/website/public/js/chat.js +++ b/website/public/js/chat.js @@ -10,7 +10,6 @@ function loadMessages() { $("#lastIDForm").serialize() ).done(function(data) { if (data && data != "[]") { - console.log(data); messages = JSON.parse(data); addMessages(messages); $("#lastID").val(messages[messages.length - 1].messageID); @@ -23,13 +22,10 @@ function loadMessages() { function sendMessage() { - console.log($("#sendMessageForm").serialize()); $.post( "API/sendMessage.php", $("#sendMessageForm").serialize() - ).done(function( data ) { - console.log(data); - }); + ); $("#newContent").val(""); } -- 2.49.1 From b7620fe4dbe3cdaf595eb71087b485e4bbeaf81e Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Fri, 20 Jan 2017 14:05:20 +0100 Subject: [PATCH 019/256] Moved .htaccess --- website/.htaccess | 14 -------------- website/public/.htaccess | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) delete mode 100644 website/.htaccess create mode 100644 website/public/.htaccess diff --git a/website/.htaccess b/website/.htaccess deleted file mode 100644 index 5c0147b..0000000 --- a/website/.htaccess +++ /dev/null @@ -1,14 +0,0 @@ -Options +FollowSymLinks -RewriteEngine On - -ErrorDocument 404 /error404.jpg - -RewriteCond %{SCRIPT_FILENAME} !-d -RewriteCond %{SCRIPT_FILENAME} !-f - -# Resolve .php file for extensionless php urls -RewriteRule ^([^/.]+)$ $1.php [L] - -RewriteRule ^([^/.]+)\/$ $1.php [L] - -RewriteRule ^profile/([A-z0-9]+)\/?$ profile.php?username=$1 [NC] \ No newline at end of file diff --git a/website/public/.htaccess b/website/public/.htaccess new file mode 100644 index 0000000..69fda24 --- /dev/null +++ b/website/public/.htaccess @@ -0,0 +1,14 @@ +#Options +FollowSymLinks +#RewriteEngine On +# +#ErrorDocument 404 /error404.jpg +# +#RewriteCond %{SCRIPT_FILENAME} !-d +#RewriteCond %{SCRIPT_FILENAME} !-f +# +## Resolve .php file for extensionless php urls +#RewriteRule ^([^/.]+)$ $1.php [L] +# +#RewriteRule ^([^/.]+)\/$ $1.php [L] +# +#RewriteRule ^profile/([A-z0-9]+)\/?$ profile.php?username=$1 [NC] \ No newline at end of file -- 2.49.1 From f9c55323ad54047ab80381499fef430b3f49fd8b Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Fri, 20 Jan 2017 14:09:04 +0100 Subject: [PATCH 020/256] Made friends and groups clickable. --- website/views/profile.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/views/profile.php b/website/views/profile.php index 6c273a6..47b880d 100644 --- a/website/views/profile.php +++ b/website/views/profile.php @@ -13,7 +13,7 @@

    fetch()) { - echo "${friend["username"]}"; + echo "${friend["username"]}"; } @@ -29,7 +29,7 @@

    fetch()) { - echo "${group["name"]}s logo"; + echo "${group["name"]}s logo"; } if($groups->rowCount() === 0) { -- 2.49.1 From 0e5f7dc9fb4e7581bef3d1f85ef1231ad9ad71c0 Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Fri, 20 Jan 2017 14:10:32 +0100 Subject: [PATCH 021/256] Fixed no friends text and no groups text. --- website/views/profile.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/views/profile.php b/website/views/profile.php index 47b880d..83ac799 100644 --- a/website/views/profile.php +++ b/website/views/profile.php @@ -17,7 +17,7 @@ } - if($friends->rowCount() === 0) { + if($profile_friends->rowCount() === 0) { echo "

    Deze gebruiker heeft nog geen vrienden gemaakt.

    "; } ?> @@ -32,7 +32,7 @@ echo "${group["name"]}s logo"; } - if($groups->rowCount() === 0) { + if($profile_groups->rowCount() === 0) { echo "

    Deze gebruiker is nog geen lid van een groep.

    "; } ?> -- 2.49.1 From adb7f2f37db78f7099b3fedbcfe48d783c9c91a7 Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Fri, 20 Jan 2017 14:31:49 +0100 Subject: [PATCH 022/256] Fixed .htaccess --- website/public/.htaccess | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/website/public/.htaccess b/website/public/.htaccess index 69fda24..5c0147b 100644 --- a/website/public/.htaccess +++ b/website/public/.htaccess @@ -1,14 +1,14 @@ -#Options +FollowSymLinks -#RewriteEngine On -# -#ErrorDocument 404 /error404.jpg -# -#RewriteCond %{SCRIPT_FILENAME} !-d -#RewriteCond %{SCRIPT_FILENAME} !-f -# -## Resolve .php file for extensionless php urls -#RewriteRule ^([^/.]+)$ $1.php [L] -# -#RewriteRule ^([^/.]+)\/$ $1.php [L] -# -#RewriteRule ^profile/([A-z0-9]+)\/?$ profile.php?username=$1 [NC] \ No newline at end of file +Options +FollowSymLinks +RewriteEngine On + +ErrorDocument 404 /error404.jpg + +RewriteCond %{SCRIPT_FILENAME} !-d +RewriteCond %{SCRIPT_FILENAME} !-f + +# Resolve .php file for extensionless php urls +RewriteRule ^([^/.]+)$ $1.php [L] + +RewriteRule ^([^/.]+)\/$ $1.php [L] + +RewriteRule ^profile/([A-z0-9]+)\/?$ profile.php?username=$1 [NC] \ No newline at end of file -- 2.49.1 From 6478ce920f56a1fe1b004b99ef253cdc6fe10a1e Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Fri, 20 Jan 2017 14:40:21 +0100 Subject: [PATCH 023/256] Fixed .htaccess --- website/public/.htaccess | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/website/public/.htaccess b/website/public/.htaccess index 5c0147b..f08898a 100644 --- a/website/public/.htaccess +++ b/website/public/.htaccess @@ -9,6 +9,4 @@ RewriteCond %{SCRIPT_FILENAME} !-f # Resolve .php file for extensionless php urls RewriteRule ^([^/.]+)$ $1.php [L] -RewriteRule ^([^/.]+)\/$ $1.php [L] - -RewriteRule ^profile/([A-z0-9]+)\/?$ profile.php?username=$1 [NC] \ No newline at end of file +RewriteRule ^profile/([A-z0-9]+)$ profile.php?username=$1 [NC] \ No newline at end of file -- 2.49.1 From 42188609363a214a33a7df8a5bbd8c91a3e6334a Mon Sep 17 00:00:00 2001 From: Hendrik Date: Fri, 20 Jan 2017 14:43:04 +0100 Subject: [PATCH 024/256] remove testinput --- website/views/adminpanel.php | 6 ------ 1 file changed, 6 deletions(-) diff --git a/website/views/adminpanel.php b/website/views/adminpanel.php index fde8237..116512c 100644 --- a/website/views/adminpanel.php +++ b/website/views/adminpanel.php @@ -62,12 +62,6 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { $listn = ($currentpage-1) * $perpage; $listm = $currentpage * $perpage; -function test_input($data) { - $data = trim($data); - $data = stripslashes($data); - $data = htmlspecialchars($data); - return $data; -} ?>
    -- 2.49.1 From ca28724274047a90649944303022a2d503cd45f7 Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Fri, 20 Jan 2017 14:48:00 +0100 Subject: [PATCH 025/256] Fixed script tags and @import. Has to be absolute path in order to work with the .htaccess file. --- website/public/profile.php | 3 ++- website/views/head.php | 17 ++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/website/public/profile.php b/website/public/profile.php index 0fe2feb..6ede201 100644 --- a/website/public/profile.php +++ b/website/public/profile.php @@ -2,8 +2,9 @@ + diff --git a/website/views/head.php b/website/views/head.php index bb6eec4..4347650 100644 --- a/website/views/head.php +++ b/website/views/head.php @@ -1,17 +1,16 @@ MyHyvesbook+ - - - - + + + Date: Fri, 20 Jan 2017 14:55:47 +0100 Subject: [PATCH 026/256] Alpha 0.0.1 profile picture upload shizzle! --- website/public/settings.php | 3 ++- website/queries/settings.php | 28 +++++++++++++++++++++++++--- website/views/settings-view.php | 3 ++- 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/website/public/settings.php b/website/public/settings.php index 45e50d8..d52608b 100644 --- a/website/public/settings.php +++ b/website/public/settings.php @@ -22,12 +22,13 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { $result = updateSettings(); break; case "password": - $result = updatePassword(); + $result = changePassword(); break; case "email": $result = changeEmail(); break; case "picture": + updateProfilePicture(); $result = $notImplemented; break; } diff --git a/website/queries/settings.php b/website/queries/settings.php index 7c92583..b85cae8 100644 --- a/website/queries/settings.php +++ b/website/queries/settings.php @@ -99,11 +99,11 @@ function updateSettings() { return new settingsMessage("happy", "Instellingen zijn opgeslagen."); } -function updatePassword() { +function changePassword() { $user = getPasswordHash(); if (password_verify($_POST["password-old"], $user["password"])) { if ($_POST["password-new"] == $_POST["password-confirm"] && (strlen($_POST["password-new"]) >= 8)) { - if (changePassword()) { + if (doChangePassword()) { return new settingsMessage("happy", "Wachtwoord gewijzigd."); } else { return new settingsMessage("angry", "Er is iets mis gegaan."); @@ -116,7 +116,7 @@ function updatePassword() { } } -function changePassword() { +function doChangePassword() { $stmt = $GLOBALS["db"]->prepare(" UPDATE `user` @@ -184,4 +184,26 @@ function doChangeEmail($email) { $stmt->bindParam(":userID", $_SESSION["userID"]); $stmt->execute(); return $stmt->rowCount(); +} + +function updateProfilePicture() { + $profilePictureDir = "/var/www/html/public/"; + $relativePath = "uploads/" . $_SESSION["userID"] . "_" . basename($_FILES["pp"]["name"]); + move_uploaded_file($_FILES['pp']['tmp_name'], $profilePictureDir . $relativePath); + setProfilePictureToDatabase("../" . $relativePath); +} + +function setProfilePictureToDatabase($url) { + $stmt = $GLOBALS["db"]->prepare(" + UPDATE + `user` + SET + `profilepicture` = :profilepicture + WHERE + `userID` = :userID + "); + + $stmt->bindParam(":profilepicture", $url); + $stmt->bindParam(":userID", $_SESSION["userID"]); + $stmt->execute(); } \ No newline at end of file diff --git a/website/views/settings-view.php b/website/views/settings-view.php index 6d9d660..f6c4e07 100644 --- a/website/views/settings-view.php +++ b/website/views/settings-view.php @@ -1,5 +1,6 @@
    @@ -68,7 +69,7 @@ $settings = getSettings();
  • -
    +
    Verander profielfoto
    • -- 2.49.1 From e547712b2a6020aaee8cb59ee4795287f82dfa74 Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Fri, 20 Jan 2017 15:02:05 +0100 Subject: [PATCH 027/256] Changed links to absolute path. --- website/views/adminpanel.php | 2 +- website/views/header.php | 12 ++++++------ website/views/login-view.php | 4 ++-- website/views/login_head.php | 6 +++--- website/views/menu.php | 2 +- website/views/profile.php | 2 +- website/views/register-view.php | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/website/views/adminpanel.php b/website/views/adminpanel.php index fde8237..e8efe6f 100644 --- a/website/views/adminpanel.php +++ b/website/views/adminpanel.php @@ -3,7 +3,7 @@ Admin Panel - +
      diff --git a/website/views/login-view.php b/website/views/login-view.php index 33fa7e9..7a023f0 100644 --- a/website/views/login-view.php +++ b/website/views/login-view.php @@ -1,6 +1,6 @@
      MyHyvesbook+
      diff --git a/website/views/login_head.php b/website/views/login_head.php index a41e87e..645f919 100644 --- a/website/views/login_head.php +++ b/website/views/login_head.php @@ -3,9 +3,9 @@ MyHyvesbook+ + href="/styles/main.css"> - + href="/styles/index.css"> + diff --git a/website/views/menu.php b/website/views/menu.php index 88ae076..c6b030a 100644 --- a/website/views/menu.php +++ b/website/views/menu.php @@ -51,7 +51,7 @@ echo "
    • -
      + - - -- 2.49.1 From e7d63c2f572a79d6a2250e2f3ae23a57f6e370fc Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Fri, 20 Jan 2017 15:34:01 +0100 Subject: [PATCH 029/256] Changed how name is displayed on profile page. --- website/public/styles/profile.css | 23 ++++------------------- website/views/profile.php | 7 ++++--- 2 files changed, 8 insertions(+), 22 deletions(-) diff --git a/website/public/styles/profile.css b/website/public/styles/profile.css index af1ed58..7437e4c 100644 --- a/website/public/styles/profile.css +++ b/website/public/styles/profile.css @@ -10,9 +10,12 @@ margin: 0 20px 20px 0; } -.profile-box .profile-username { +.profile-box h1.profile-username { padding-top: 50px; } +.profile-box h5.profile-username { + padding-top: 0; +} div.posts { padding-top: 20px; @@ -37,24 +40,6 @@ div.posts .post p.subscript { font-size: 8pt; } -/*.posts {*/ - /*z-index: -1;*/ - /*margin-right: 0;*/ - /*width: calc(100% + 15px);*/ -/*}*/ - -/*.post-box {*/ - /*display: inline-flex;*/ - /*margin: 20px 15px 0 0;*/ - /*padding: 25px;*/ - /*background-color: #FFFFFF;*/ -/*}*/ - -/*!* fullscreen *!*/ -/*.post-box {*/ - /*width: calc(25% - 69px);*/ -/*}*/ - @media only screen and (max-width: 1500px) { .post-box { width: calc(50% - 68px); diff --git a/website/views/profile.php b/website/views/profile.php index f8cdadd..1457dee 100644 --- a/website/views/profile.php +++ b/website/views/profile.php @@ -4,7 +4,8 @@

      Als vriend toevoegen

      -

      ()

      +

      +

      @@ -13,7 +14,7 @@

      fetch()) { - echo "${friend["username"]}"; + echo "${friend["username"]}"; } @@ -29,7 +30,7 @@

      fetch()) { - echo "${group["name"]}s logo"; + echo "${group["name"]}s logo"; } if($profile_groups->rowCount() === 0) { -- 2.49.1 From 587d0e6ac351787fe1d944b06c6a05b42e1952f1 Mon Sep 17 00:00:00 2001 From: Marijn Jansen Date: Fri, 20 Jan 2017 15:41:13 +0100 Subject: [PATCH 030/256] fixed crosssitescripting on settings pagw --- website/queries/settings.php | 8 ++++---- website/views/settings-view.php | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/website/queries/settings.php b/website/queries/settings.php index b85cae8..7d3bf9c 100644 --- a/website/queries/settings.php +++ b/website/queries/settings.php @@ -87,11 +87,11 @@ function updateSettings() { `userID` = :userID "); - $stmt->bindParam(":fname", $_POST["fname"]); - $stmt->bindParam(":lname", $_POST["lname"]); - $stmt->bindParam(":location", $_POST["location"]); + $stmt->bindParam(":fname", test_input($_POST["fname"])); + $stmt->bindParam(":lname", test_input($_POST["lname"])); + $stmt->bindParam(":location", test_input($_POST["location"])); $stmt->bindParam(":bday", $_POST["bday"]); - $stmt->bindParam(":bio", $_POST["bio"]); + $stmt->bindParam(":bio", test_input($_POST["bio"])); $stmt->bindParam(":userID", $_SESSION["userID"]); $stmt->execute(); diff --git a/website/views/settings-view.php b/website/views/settings-view.php index f6c4e07..1fa5278 100644 --- a/website/views/settings-view.php +++ b/website/views/settings-view.php @@ -1,6 +1,5 @@

      -- 2.49.1 From e17a55e82dff94723917a2393698892134aab18e Mon Sep 17 00:00:00 2001 From: Joey Lai Date: Fri, 20 Jan 2017 16:01:08 +0100 Subject: [PATCH 031/256] Fixed redirect to profile page after going back 1 page --- website/public/js/registerAndLogin.js | 8 ++++++++ website/public/login.php | 13 +------------ website/public/register.php | 6 ++++-- website/views/login_head.php | 1 + 4 files changed, 14 insertions(+), 14 deletions(-) create mode 100644 website/public/js/registerAndLogin.js diff --git a/website/public/js/registerAndLogin.js b/website/public/js/registerAndLogin.js new file mode 100644 index 0000000..8428440 --- /dev/null +++ b/website/public/js/registerAndLogin.js @@ -0,0 +1,8 @@ +function checkLoggedIn() { + if (confirm("You are already logged in!\nDo you want to logout?\nPress ok to logout.") == true) { + window.location.href = "logout.php"; + } else { + window.history.back(); + } + document.getElementById("demo").innerHTML = x; +} diff --git a/website/public/login.php b/website/public/login.php index b3da203..0d07413 100644 --- a/website/public/login.php +++ b/website/public/login.php @@ -4,20 +4,9 @@ include("../views/login_head.php"); require_once("../queries/connect.php"); include_once("../queries/login.php"); - include_once("../queries/checkInput.php") + include_once("../queries/checkInput.php"); ?> - - + -- 2.49.1 From 6ff70440e67ad96ef71867ef26ca1a1f3f90135c Mon Sep 17 00:00:00 2001 From: Joey Lai Date: Fri, 20 Jan 2017 16:14:32 +0100 Subject: [PATCH 032/256] history back -> profile.php --- website/public/js/registerAndLogin.js | 2 +- website/public/register.php | 2 +- website/views/login_head.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/website/public/js/registerAndLogin.js b/website/public/js/registerAndLogin.js index 8428440..0452d15 100644 --- a/website/public/js/registerAndLogin.js +++ b/website/public/js/registerAndLogin.js @@ -2,7 +2,7 @@ function checkLoggedIn() { if (confirm("You are already logged in!\nDo you want to logout?\nPress ok to logout.") == true) { window.location.href = "logout.php"; } else { - window.history.back(); + window.location.href = "profile.php"; } document.getElementById("demo").innerHTML = x; } diff --git a/website/public/register.php b/website/public/register.php index ec1f879..8c0f8e4 100644 --- a/website/public/register.php +++ b/website/public/register.php @@ -29,7 +29,7 @@ } else { $bday = test_input($_POST["bday"]); } -g + checkInputChoice("username", "username"); checkInputChoice("password", "longerEight"); checkInputChoice("confirmpassword", ""); diff --git a/website/views/login_head.php b/website/views/login_head.php index 7f1771a..05c9e38 100644 --- a/website/views/login_head.php +++ b/website/views/login_head.php @@ -7,6 +7,6 @@ - + -- 2.49.1 From 173ef3e50c2feceb27e715fddbfc33aac08ff5db Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Fri, 20 Jan 2017 16:17:56 +0100 Subject: [PATCH 033/256] Added a notification bar --- website/public/js/header.js | 24 ++++++++++++++++++++++-- website/public/styles/header.css | 22 +--------------------- website/public/styles/menu.css | 17 +++++++++++++++++ website/queries/friendship.php | 3 ++- website/views/header.php | 9 +++------ website/views/notification-center.php | 11 +++++++++++ 6 files changed, 56 insertions(+), 30 deletions(-) create mode 100644 website/views/notification-center.php diff --git a/website/public/js/header.js b/website/public/js/header.js index 797c56c..ceb6086 100644 --- a/website/public/js/header.js +++ b/website/public/js/header.js @@ -1,7 +1,27 @@ $(document).ready(function() { + // Hide notification center. $("#profile-menu-popup").hide(); + + // $("#own-profile-picture").click(function() { + // $("#profile-menu-popup").toggle(); + // $("#profile-hello-popup").toggle(); + // }); + $("#own-profile-picture").click(function() { - $("#profile-menu-popup").toggle(); - $("#profile-hello-popup").toggle(); + if($("#notification-center").css('right') == "-256px") { + // $(".content").animate({ + // marginRight: "256px" + // }, 500); + $("#notification-center").animate({ + right: "0px" + }, 500); + } else { + // $(".content").animate({ + // marginRight: "0px" + // }, 500); + $("#notification-center").animate({ + right: "-256px" + }, 500); + } }); }); diff --git a/website/public/styles/header.css b/website/public/styles/header.css index 84f308c..ddefdec 100644 --- a/website/public/styles/header.css +++ b/website/public/styles/header.css @@ -33,32 +33,12 @@ header { header div { display: inline-block; } - -#open-chat { - font-size: 32px; - line-height: 80px; - margin-right: 50px; -} - -.profile-menu { - font-size: 21px; -} - .profile-menu img { padding: 8px; height: 64px; width: 64px; } -#own-profile-picture, #profile-menu-popup span { +#own-profile-picture { cursor: pointer; } - -#profile-menu-popup { - padding: 5px; - - background: white; - color: #666; - - border-radius: 3px; -} diff --git a/website/public/styles/menu.css b/website/public/styles/menu.css index 4d4b8bb..b9e3904 100644 --- a/website/public/styles/menu.css +++ b/website/public/styles/menu.css @@ -42,4 +42,21 @@ height: 100%; padding: 0; text-align: left; +} + +#notification-center { + left: auto; + width: 256px; + right: -256px; +} + +#quick-links { + text-align: center; + box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); +} + +#quick-links i { + color: #845663; + font-size: 42px; + padding: 7px; } \ No newline at end of file diff --git a/website/queries/friendship.php b/website/queries/friendship.php index 258699f..df6a917 100644 --- a/website/queries/friendship.php +++ b/website/queries/friendship.php @@ -15,13 +15,14 @@ function selectAllFriends($userID) { `user` INNER JOIN `friendship` + WHERE (`friendship`.`user1ID` = :userID AND `friendship`.`user2ID` = `user`.`userID` OR `friendship`.`user2ID` = :userID AND `friendship`.`user1ID` = `user`.`userID`) AND `role` != 5 AND - `status` = 1 + `status` = 1 "); $stmt->bindParam(':userID', $userID, PDO::PARAM_INT); diff --git a/website/views/header.php b/website/views/header.php index a58e5f0..2d65291 100644 --- a/website/views/header.php +++ b/website/views/header.php @@ -19,11 +19,6 @@ $userinfo = getHeaderInfo();
      -
      - | - | - -
      Hallo @@ -32,5 +27,7 @@ $userinfo = getHeaderInfo();
      "/>
      -
      + + + diff --git a/website/views/notification-center.php b/website/views/notification-center.php new file mode 100644 index 0000000..f4b4b5d --- /dev/null +++ b/website/views/notification-center.php @@ -0,0 +1,11 @@ + \ No newline at end of file -- 2.49.1 From 9152ae4f75b17fd7903ba10624f54560f337a637 Mon Sep 17 00:00:00 2001 From: Hendrik Date: Fri, 20 Jan 2017 16:18:09 +0100 Subject: [PATCH 034/256] add searching users, searching groups, remembering search options --- website/public/search.php | 6 +- website/public/styles/search.css | 5 ++ website/queries/group_page.php | 23 +++++- website/queries/user.php | 35 ++++++++- website/views/search-view.php | 120 +++++++++++++++++++------------ 5 files changed, 137 insertions(+), 52 deletions(-) diff --git a/website/public/search.php b/website/public/search.php index c314791..6cfadd8 100644 --- a/website/public/search.php +++ b/website/public/search.php @@ -1,7 +1,11 @@ - + diff --git a/website/public/styles/search.css b/website/public/styles/search.css index 4b2281c..b54723d 100644 --- a/website/public/styles/search.css +++ b/website/public/styles/search.css @@ -9,4 +9,9 @@ #search-friends-output { margin-right: 10px; +} + +.searchleft, .searchright { + display: inline-block; + vertical-align: top; } \ No newline at end of file diff --git a/website/queries/group_page.php b/website/queries/group_page.php index ef7af07..d704e8c 100644 --- a/website/queries/group_page.php +++ b/website/queries/group_page.php @@ -172,5 +172,26 @@ function changeMultipleGroupStatusByID($ids, $status) { return $q; } +function searchSomeGroups($n, $m, $search) { + $stmt = $GLOBALS["db"]->prepare(" + SELECT + `name`, + `picture` + FROM + `group_page` + WHERE + `name` LIKE :keyword + ORDER BY + `name` + LIMIT + :n, :m + "); -?> + $search = "%$search%"; + $stmt->bindParam(':keyword', $search); + $stmt->bindParam(':n', $n, PDO::PARAM_INT); + $stmt->bindParam(':m', $m, PDO::PARAM_INT); + $stmt->execute(); + return $stmt; +} +?> \ No newline at end of file diff --git a/website/queries/user.php b/website/queries/user.php index 398e2e4..114d673 100644 --- a/website/queries/user.php +++ b/website/queries/user.php @@ -252,12 +252,12 @@ function selectRandomNotFriendUser($userID) { FROM `user` WHERE - `userID` NOT IN (SELECT + `userID` NOT IN (SELECT `user1ID` FROM `friendship` WHERE `user1ID` = :userID) OR - `userID` NOT IN (SELECT + `userID` NOT IN (SELECT `user2ID` FROM `friendship` @@ -271,4 +271,33 @@ function selectRandomNotFriendUser($userID) { $stmt->bindParam(':userID', $userID, PDO::PARAM_INT); $stmt->execute(); return $stmt->fetch(); -} \ No newline at end of file +} + +function searchSomeUsers($n, $m, $search) { + $stmt = $GLOBALS["db"]->prepare(" + SELECT + `username`, + `profilepicture`, + `fname`, + `lname` + FROM + `user` + WHERE + `username` LIKE :keyword OR + `fname` LIKE :keyword OR + `lname` LIKE :keyword + ORDER BY + `fname`, + `lname`, + `username` + LIMIT + :n, :m + "); + + $search = "%$search%"; + $stmt->bindParam(':keyword', $search); + $stmt->bindParam(':n', $n, PDO::PARAM_INT); + $stmt->bindParam(':m', $m, PDO::PARAM_INT); + $stmt->execute(); + return $stmt; +} diff --git a/website/views/search-view.php b/website/views/search-view.php index b1418d1..0d650d4 100644 --- a/website/views/search-view.php +++ b/website/views/search-view.php @@ -1,3 +1,16 @@ + +
      @@ -7,72 +20,85 @@ + value= + >
      -
      +

      Gebruikers

      -
      - \ No newline at end of file +
      -- 2.49.1 From 18185020c3b4a389d623042050a8edafe622dc6a Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Fri, 20 Jan 2017 16:18:12 +0100 Subject: [PATCH 035/256] Added improvements to profile page. --- website/public/styles/profile.css | 21 +++++++++++++-------- website/views/profile.php | 12 ++++++++++++ 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/website/public/styles/profile.css b/website/public/styles/profile.css index 7437e4c..9c07242 100644 --- a/website/public/styles/profile.css +++ b/website/public/styles/profile.css @@ -40,6 +40,19 @@ div.posts .post p.subscript { font-size: 8pt; } +div.posts .post form input, div.posts .post form textarea { + width: calc(100% - 15px); +} + +div.posts .post form input[type="submit"] { + width: 100%; +} + +div.posts .post form textarea.newpost { + margin: 15px 0 15px 0; + height: 100px; +} + @media only screen and (max-width: 1500px) { .post-box { width: calc(50% - 68px); @@ -53,14 +66,6 @@ div.posts .post p.subscript { } } -.post { - width: 100%; -} - -.post img { - width: 100%; -} - .post .post-date { float: right; color: #aaaaaa; diff --git a/website/views/profile.php b/website/views/profile.php index 1457dee..19bd908 100644 --- a/website/views/profile.php +++ b/website/views/profile.php @@ -42,6 +42,18 @@
      +
      +
      + + + + +
      + fetch()) { $nicetime = nicetime($post["creationdate"]); echo " -- 2.49.1 From ac96200d1642a663c61545de841af182285d9981 Mon Sep 17 00:00:00 2001 From: Marijn Jansen Date: Fri, 20 Jan 2017 16:20:34 +0100 Subject: [PATCH 036/256] Kind of works now: Profile update --- website/public/settings.php | 2 +- website/queries/settings.php | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/website/public/settings.php b/website/public/settings.php index d52608b..06d17c0 100644 --- a/website/public/settings.php +++ b/website/public/settings.php @@ -29,7 +29,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { break; case "picture": updateProfilePicture(); - $result = $notImplemented; + $result = new settingsMessage("happy", "Deze melding doet nog niks nuttigs."); break; } } diff --git a/website/queries/settings.php b/website/queries/settings.php index 7d3bf9c..0e6dff2 100644 --- a/website/queries/settings.php +++ b/website/queries/settings.php @@ -188,22 +188,28 @@ function doChangeEmail($email) { function updateProfilePicture() { $profilePictureDir = "/var/www/html/public/"; - $relativePath = "uploads/" . $_SESSION["userID"] . "_" . basename($_FILES["pp"]["name"]); + $relativePath = "uploads/profilepictures/" . $_SESSION["userID"] . "_" . basename($_FILES["pp"]["name"]); +// removeOldProfilePicture(); move_uploaded_file($_FILES['pp']['tmp_name'], $profilePictureDir . $relativePath); setProfilePictureToDatabase("../" . $relativePath); } +//function removeOldProfilePicture() { +// +// unlink("/var/www/html/public/uploads/profilepictures/" . $_SESSION["userID"] . "_*"); +//} + function setProfilePictureToDatabase($url) { $stmt = $GLOBALS["db"]->prepare(" UPDATE `user` SET - `profilepicture` = :profilepicture + `profilepicture` = :profilePicture WHERE `userID` = :userID "); - $stmt->bindParam(":profilepicture", $url); + $stmt->bindParam(":profilePicture", $url); $stmt->bindParam(":userID", $_SESSION["userID"]); $stmt->execute(); } \ No newline at end of file -- 2.49.1 From 2a44057233f4abb86eec42c419e566adcb5e7d2d Mon Sep 17 00:00:00 2001 From: Marijn Jansen Date: Sun, 22 Jan 2017 11:23:13 +0100 Subject: [PATCH 037/256] Changed binParam for bindValue --- website/queries/settings.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/website/queries/settings.php b/website/queries/settings.php index 0e6dff2..f4c7011 100644 --- a/website/queries/settings.php +++ b/website/queries/settings.php @@ -87,12 +87,12 @@ function updateSettings() { `userID` = :userID "); - $stmt->bindParam(":fname", test_input($_POST["fname"])); - $stmt->bindParam(":lname", test_input($_POST["lname"])); - $stmt->bindParam(":location", test_input($_POST["location"])); - $stmt->bindParam(":bday", $_POST["bday"]); - $stmt->bindParam(":bio", test_input($_POST["bio"])); - $stmt->bindParam(":userID", $_SESSION["userID"]); + $stmt->bindValue(":fname", test_input($_POST["fname"])); + $stmt->bindValue(":lname", test_input($_POST["lname"])); + $stmt->bindValue(":location", test_input($_POST["location"])); + $stmt->bindValue(":bday", $_POST["bday"]); + $stmt->bindValue(":bio", test_input($_POST["bio"])); + $stmt->bindValue(":userID", $_SESSION["userID"]); $stmt->execute(); -- 2.49.1 From 93b6835ea4400193d9a8fe98ecbafb7018ab4697 Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Mon, 23 Jan 2017 11:33:27 +0100 Subject: [PATCH 038/256] Changed style and added friendrequests --- website/public/API/loadMessages.php | 1 + website/public/API/loadNotifications.php | 8 +++ website/public/js/notifications.js | 34 ++++++++++++ website/public/profile.php | 2 +- website/public/styles/adminpanel.css | 4 +- website/public/styles/chat.css | 2 +- website/public/styles/header.css | 8 ++- website/public/styles/index.css | 2 +- website/public/styles/main.css | 71 +++++++++++++++++------- website/public/styles/menu.css | 12 +++- website/public/styles/profile.css | 16 +++++- website/queries/friendship.php | 33 ++++++++++- website/views/head.php | 17 +++--- website/views/header.php | 2 +- website/views/menu.php | 6 +- website/views/notification-center.php | 7 ++- 16 files changed, 178 insertions(+), 47 deletions(-) create mode 100644 website/public/API/loadNotifications.php create mode 100644 website/public/js/notifications.js diff --git a/website/public/API/loadMessages.php b/website/public/API/loadMessages.php index 1c6b942..e30acc8 100644 --- a/website/public/API/loadMessages.php +++ b/website/public/API/loadMessages.php @@ -1,6 +1,7 @@ \ +
      \ + \ + \ +
    • \ + "); + } +} + +function loadNotifications() { + $.post( + "API/loadNotifications.php" + ).done(function(data) { + if (data && data != "[]") { + showNotifications(JSON.parse(data), "friendrequestslist"); + } + }); + + setTimeout(loadNotifications, 10000); +} + +loadNotifications(); + diff --git a/website/public/profile.php b/website/public/profile.php index 6ede201..e4f1452 100644 --- a/website/public/profile.php +++ b/website/public/profile.php @@ -4,7 +4,7 @@ diff --git a/website/public/styles/adminpanel.css b/website/public/styles/adminpanel.css index b226cd3..4c5356f 100644 --- a/website/public/styles/adminpanel.css +++ b/website/public/styles/adminpanel.css @@ -6,7 +6,7 @@ .admin-title { margin: 10px; padding-bottom: 5px; - border-bottom: 4px solid #845663; + border-bottom: 4px solid #FBC02D; } .admin-panel input[type="radio"], input[type="checkbox"] { @@ -18,7 +18,7 @@ padding: 8px; vertical-align: top; border-radius: 10px; - border: 4px solid #845663; + border: 4px solid #FBC02D; box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); } diff --git a/website/public/styles/chat.css b/website/public/styles/chat.css index e2fa7c9..f6060dd 100644 --- a/website/public/styles/chat.css +++ b/website/public/styles/chat.css @@ -83,7 +83,7 @@ .chat-field input[type="submit"] { width: auto; float: right; - background-color: #845663; + background-color: #FBC02D; color: white; padding: 5px 10px; border-radius: 0 10px 10px 0; diff --git a/website/public/styles/header.css b/website/public/styles/header.css index ddefdec..e39f204 100644 --- a/website/public/styles/header.css +++ b/website/public/styles/header.css @@ -8,21 +8,23 @@ header { width: 100%; color: white; - background-color: rgba(132,86,99, 0.98); + background-color: #FBC02D; box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); } +#header-logo { + padding-left: 42px; +} #header-logo, #header-logo img { height: 80px; vertical-align: middle; line-height: 80px; - padding-left: 5px; } #header-search { - padding-left: 48px; + padding-left: 42px; } diff --git a/website/public/styles/index.css b/website/public/styles/index.css index 4b55904..6c12823 100644 --- a/website/public/styles/index.css +++ b/website/public/styles/index.css @@ -19,7 +19,7 @@ body { background-size: cover; background-attachment: fixed;*/ - /*background-color: #B78996;*/ + /*background-color: #EEE;*/ color: #333; font-family: Arial, sans-serif; } diff --git a/website/public/styles/main.css b/website/public/styles/main.css index 014d05b..062d5d9 100644 --- a/website/public/styles/main.css +++ b/website/public/styles/main.css @@ -18,7 +18,7 @@ html { body { height: 100%; - background-color: #B78996; + background-color: #EEE; color: #333; font-family: Arial, sans-serif; } @@ -37,11 +37,12 @@ h3 { } h4 { - font-size: 1.6em; + font-size: 1.2em; } h5 { - font-size: 1.4em; + font-size: 1.0em; + color: #666; } ul { @@ -54,12 +55,12 @@ p { /* Selection colors */ ::selection { - background: #845663; + background: #FBC02D; color: white; } ::-moz-selection { - background: #845663; + background: #FBC02D; color: white; } @@ -75,7 +76,7 @@ p { .platform { padding: 20px; margin-bottom: 10px; - border-radius: 10px; + border-radius: 5px; background-color: #FFFFFF; box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); } @@ -143,7 +144,7 @@ button, input, select { cursor: pointer; border: none; font-size: 16px; - border-radius: 7px; + transition-duration: 250ms; } /* All textinput and sections */ @@ -151,19 +152,53 @@ textarea, input, select { padding: 0 5px; background: white; color: #333333; - border: 1px solid #845663; - border-radius: 7px; + border-radius: 5px; + border-bottom: 1px solid #4CAF50; font-size: 16px; + outline: none; + transition-duration: 250ms; +} + +textarea { + padding: 5px; + resize: none; +} + +textarea:hover, input:hover, select:hover { + border-radius: 10px; +} + +textarea:focus, input:focus, select:focus { + border-radius: 10px; + box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); } /* All buttons */ button, input[type="submit"], input[type="reset"] { - background-color: #845663; + background-color: #FBC02D; color: white; padding: 0 10px; border: none; + border-radius: 5px; +} + +button:focus, +input[type="submit"]:focus, +input[type="reset"]:focus { + outline: none; +} + +button:active, +input[type="submit"]:active, +input[type="reset"]:active { + outline: none; + box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24) +} + +input[type="radio"] { + border-radius: 100%; } /* Tables */ @@ -190,19 +225,17 @@ img[data-title]:hover:after, span[data-title]:hover:after, div[data-title]:hover:after { content: attr(data-title); - padding: 4px 4px; + padding: 7px 7px; color: #FFFFFF; position: absolute; left: 0; - top: 100%; - z-index: 20; + top: 150%; + z-index: 200; white-space: nowrap; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - border-radius: 5px; - -moz-box-shadow: 0 0 4px #222; - -webkit-box-shadow: 0 0 4px #222; - box-shadow: 0 0 4px #222; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22); background-color: #333; font-size: 15px; line-height: normal; diff --git a/website/public/styles/menu.css b/website/public/styles/menu.css index b9e3904..69aa8a9 100644 --- a/website/public/styles/menu.css +++ b/website/public/styles/menu.css @@ -1,6 +1,7 @@ .menu { position: fixed; z-index: 50; + overflow-y: auto; left: 0; top: 80px; @@ -11,6 +12,10 @@ box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); } +.menu section { + box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); +} + .menu h4 { padding: 10px; } @@ -26,12 +31,13 @@ cursor: pointer; } -.friend-item { +.friend-item, .group-item { cursor: pointer; + transition-duration: 250ms; } .friend-item:hover, .group-item:hover { - background: #845663; + background: #FBC02D; color: white; } @@ -56,7 +62,7 @@ } #quick-links i { - color: #845663; + color: #4CAF50; font-size: 42px; padding: 7px; } \ No newline at end of file diff --git a/website/public/styles/profile.css b/website/public/styles/profile.css index 9c07242..f5dd6b1 100644 --- a/website/public/styles/profile.css +++ b/website/public/styles/profile.css @@ -14,7 +14,7 @@ padding-top: 50px; } .profile-box h5.profile-username { - padding-top: 0; + padding: 0 0 10px 0; } div.posts { @@ -28,6 +28,15 @@ div.posts div.post { margin: 20px 0 0 0; padding: 10px; width: calc(100% - 40px); + cursor: pointer; + transition-duration: 250ms; +} + +div.posts div.post:hover { + /*margin: 15px 0 0 -5px;*/ + /*padding: 15px;*/ + /*z-index: 20;*/ + box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23); } div.posts div.post img { @@ -76,11 +85,12 @@ div.posts .post form textarea.newpost { float: right; padding: 10px; border-radius: 5px; - background-color: #845663; + background-color: #4CAF50; color: #FFFFFF; transition-duration: 250ms; + cursor: pointer; } .profile-button:hover { - background-color: #B78996; + box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23); } \ No newline at end of file diff --git a/website/queries/friendship.php b/website/queries/friendship.php index df6a917..0deba63 100644 --- a/website/queries/friendship.php +++ b/website/queries/friendship.php @@ -22,11 +22,42 @@ function selectAllFriends($userID) { `friendship`.`user2ID` = :userID AND `friendship`.`user1ID` = `user`.`userID`) AND `role` != 5 AND - `status` = 1 + `status` = 1 "); $stmt->bindParam(':userID', $userID, PDO::PARAM_INT); $stmt->execute(); return $stmt; +} + +function selectAllFriendRequests() { + $stmt = $GLOBALS["db"]->prepare(" + SELECT + `userID`, + `username`, + IFNULL( + `profilepicture`, + '../img/notbad.jpg' + ) AS profilepicture, + `onlinestatus`, + `role` + FROM + `user` + INNER JOIN + `friendship` + + WHERE + (`friendship`.`user1ID` = :userID AND + `friendship`.`user2ID` = `user`.`userID` OR + `friendship`.`user2ID` = :userID AND + `friendship`.`user1ID` = `user`.`userID`) AND + `role` != 5 AND + `status` = 0 + "); + + $stmt->bindParam(':userID', $_SESSION["userID"], PDO::PARAM_INT); + $stmt->execute(); + + return json_encode($stmt->fetchAll()); } \ No newline at end of file diff --git a/website/views/head.php b/website/views/head.php index 4347650..044ac83 100644 --- a/website/views/head.php +++ b/website/views/head.php @@ -1,16 +1,17 @@ MyHyvesbook+ - - - + + + + MyHyvesbook+
    -
    +
    diff --git a/website/views/menu.php b/website/views/menu.php index a150848..b7651bd 100644 --- a/website/views/menu.php +++ b/website/views/menu.php @@ -1,5 +1,5 @@
    -
    - | - | - -
    Hallo @@ -32,5 +28,4 @@ $userinfo = getHeaderInfo();
    "/>
    -
    -- 2.49.1 From 7eec0cfa2ae345846e0556855d295fbe606c17c5 Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Mon, 23 Jan 2017 17:22:22 +0100 Subject: [PATCH 048/256] Begin chat change --- website/public/js/header.js | 8 -------- website/public/styles/chat.css | 10 ++++++---- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/website/public/js/header.js b/website/public/js/header.js index 093cc91..a0052c3 100644 --- a/website/public/js/header.js +++ b/website/public/js/header.js @@ -1,12 +1,4 @@ $(document).ready(function() { - // Hide notification center. - $("#profile-menu-popup").hide(); - - // $("#own-profile-picture").click(function() { - // $("#profile-menu-popup").toggle(); - // $("#profile-hello-popup").toggle(); - // }); - $("#own-profile-picture").click(function() { if($("#notification-center").css('right') == "-256px") { $(".content").animate({ diff --git a/website/public/styles/chat.css b/website/public/styles/chat.css index f6060dd..c7d0235 100644 --- a/website/public/styles/chat.css +++ b/website/public/styles/chat.css @@ -25,6 +25,7 @@ /* Chat history. */ .chat-history { overflow-y: auto; + overflow-x: hidden; height: 100%; padding: 10px; } @@ -46,14 +47,15 @@ .chat-message-self { float: right; margin-right: 10px; - background-color: darkgreen; + background-color: #FBC02D; color: white; } .chat-message-other { float: left; margin-left: 10px; - background-color: aquamarine; + background-color: #4CAF50; + color: white; } /* Chat reply field */ @@ -91,6 +93,6 @@ } .active-friend-chat { - background: aquamarine; - color: #333; + background: #4CAF50; + color: white; } \ No newline at end of file -- 2.49.1 From c4e4508b53d8e10687597cb083190149cea375f2 Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Tue, 24 Jan 2017 10:19:13 +0100 Subject: [PATCH 049/256] Changed admin layout and fixed for enums --- website/public/js/admin.js | 2 +- website/public/js/header.js | 6 +- website/public/styles/adminpanel.css | 66 ++-------- website/public/styles/chat.css | 8 +- website/public/styles/header.css | 4 +- website/views/adminpanel.php | 190 ++++++++++++--------------- 6 files changed, 109 insertions(+), 167 deletions(-) diff --git a/website/public/js/admin.js b/website/public/js/admin.js index 2055123..e3dfdd7 100644 --- a/website/public/js/admin.js +++ b/website/public/js/admin.js @@ -28,7 +28,7 @@ function checkCheckAll(allbox) { } function changeFilter() { - if (document.getElementById('group').checked) { + if ($('#pagetype').find(":selected").val() == "group") { document.getElementById('admin-filter').style.display = 'none'; document.getElementById('admin-groupfilter').style.display = 'inline-block'; diff --git a/website/public/js/header.js b/website/public/js/header.js index 23e4f0f..8d91d95 100644 --- a/website/public/js/header.js +++ b/website/public/js/header.js @@ -5,14 +5,14 @@ $(document).ready(function() { marginRight: "256px" }, 500); $(".chat-right").animate({ - width: "calc(100% - 512px - 40px)" + width: $(".chat-right").width() - 266 }, 500); $("#notification-center").animate({ right: "0px" }, 500); } else { $(".chat-right").animate({ - width: "calc(100% - 256px - 40px)" + width: $(".chat-right").width() + 266 }, 500); $(".content").animate({ marginRight: "0px" @@ -22,6 +22,4 @@ $(document).ready(function() { }, 500); } }); - - $("#own-profile-picture").click(); }); diff --git a/website/public/styles/adminpanel.css b/website/public/styles/adminpanel.css index 4c5356f..f9410e1 100644 --- a/website/public/styles/adminpanel.css +++ b/website/public/styles/adminpanel.css @@ -1,71 +1,33 @@ .admin-panel { - margin: auto; min-width: 800px; } -.admin-title { - margin: 10px; - padding-bottom: 5px; - border-bottom: 4px solid #FBC02D; -} - .admin-panel input[type="radio"], input[type="checkbox"] { + vertical-align: middle; height: auto; -} - -.admin-batchactions, .admin-groupbatchactions { - display: inline-block; - padding: 8px; - vertical-align: top; - border-radius: 10px; - border: 4px solid #FBC02D; - box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); + margin: 2px; } .admin-searchform { display: inline-block; + width: 100%; } .admin-searchbar { - display: inline-block; - margin: 10px; - vertical-align: top; -} - -.admin-searchinput { - margin-bottom: 10px; -} - -.admin-filter, .admin-filtertype, .admin-groupfilter { - display: inline-block; - margin: 10px; - vertical-align: top; - margin-right: 50px; - margin-left: 50px; -} - -.admin-filter, .admin-groupfilter { - width: 120px; -} - -.admin-users { - margin: 10px; -} - -.admin-userheading { - width: auto; - float: left; -} - -.admin-pageui { - text-align: right; - float: right; - width: auto; margin-bottom: 20px; } -.usertitle { - width: 150px; +.admin-pageui { + display: inline-block; + width: 100%; +} + +.admin-pageselector { + display: inline-block; +} + +.admin-users { + margin-top: 50px; } .usertable { diff --git a/website/public/styles/chat.css b/website/public/styles/chat.css index c7d0235..16505f5 100644 --- a/website/public/styles/chat.css +++ b/website/public/styles/chat.css @@ -3,7 +3,7 @@ position: fixed; top: 80px; left: 256px; - padding: 15px 0; + padding: 20px 0; width: calc(100% - 256px); height: calc(100% - 120px); display: inline-flex; @@ -28,6 +28,8 @@ overflow-x: hidden; height: 100%; padding: 10px; + + word-wrap: break-word; } /* Chat-message takes the whole width of the chat area */ @@ -48,7 +50,7 @@ float: right; margin-right: 10px; background-color: #FBC02D; - color: white; + color: #333; } .chat-message-other { @@ -79,7 +81,6 @@ width: 100%; border: none; border-radius: 10px 0 0 10px; - box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); } .chat-field input[type="submit"] { @@ -89,7 +90,6 @@ color: white; padding: 5px 10px; border-radius: 0 10px 10px 0; - box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); } .active-friend-chat { diff --git a/website/public/styles/header.css b/website/public/styles/header.css index e39f204..0b70455 100644 --- a/website/public/styles/header.css +++ b/website/public/styles/header.css @@ -7,7 +7,9 @@ header { height: 80px; width: 100%; - color: white; + color: #FFF; + font-weight: bold; + letter-spacing: 1px; background-color: #FBC02D; box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); } diff --git a/website/views/adminpanel.php b/website/views/adminpanel.php index e53d679..d97a9e8 100644 --- a/website/views/adminpanel.php +++ b/website/views/adminpanel.php @@ -1,16 +1,8 @@ - - - - - Admin Panel - - - - - + +
    -
    -

    User Management Panel

    -

    +
    Zoek naar gebruikers of groepen:
    " method="get"> + - -
    -

    Show:

    - - > +
    +
    Type gebruiker:
    + > +
    + >
    - > + >
    - > + >
    - > + >
    - > + >
    - > + >
    -
    -

    Show:

    - +
    +
    Type groep:
    + > +
    >
    @@ -118,60 +143,12 @@ $listm = $currentpage * $perpage; >
    - -
    -

    Page Type:

    - - onchange="changeFilter()"> -
    - - onchange="changeFilter()"> - -
    - -
    -

    Batch Actions:

    -
    - -
    - -
    - -

    - - -
    - -
    -

    Batch Actions:

    -
    - -
    - -
    - -

    - - -
    -
    -
    -
    -

    Users:

    -
    -
    +

    Resultaat:

    + -

    Current page:

    -
    -

    -

    -

    + +
    + + + + +
    $username $role
    $name $role
    - - + + - - + + @@ -226,7 +207,6 @@ $listm = $currentpage * $perpage; if ($pagetype == 'user') { $q = searchSomeUsersByStatus($listn, $listm, $search, $status); - while($user = $q->fetch(PDO::FETCH_ASSOC)) { $userID = $user['userID']; $username = $user['username']; @@ -252,9 +232,9 @@ $listm = $currentpage * $perpage; action='$thispage' method='post'> -- 2.49.1 From 62a2b32c959154274aa71c8c312801da0f642f1a Mon Sep 17 00:00:00 2001 From: Marijn Jansen Date: Tue, 24 Jan 2017 12:12:48 +0100 Subject: [PATCH 050/256] Changed Alerts to Exceptions. --- website/public/settings.php | 39 ++++++----- website/queries/settings.php | 112 ++++++++++++++++---------------- website/views/settings-view.php | 4 +- 3 files changed, 82 insertions(+), 73 deletions(-) diff --git a/website/public/settings.php b/website/public/settings.php index b473f99..41affe6 100644 --- a/website/public/settings.php +++ b/website/public/settings.php @@ -12,23 +12,30 @@ getClass(); + $alertMessage = $w->getMessage(); } } include("../views/main.php"); diff --git a/website/queries/settings.php b/website/queries/settings.php index 1a5dacf..ef718a3 100644 --- a/website/queries/settings.php +++ b/website/queries/settings.php @@ -1,35 +1,34 @@ message = $message; - switch ($type) { - case "happy": - $this->class = "settings-message-happy"; - break; - case "angry": - $this->class = "settings-message-angry"; - break; - default: - $this->class = "settings-message"; - break; - } + abstract public function getClass(); +} + +class HappyWarning extends SettingsWarning { + + public function __construct($message = "Gelukt!", $code = 0, Exception $previous = null) + { + parent::__construct($message, $code, $previous); } public function getClass() { - return $this->class; + return "settings-message-happy"; + } +} + +class AngryWarning extends SettingsWarning { + public function __construct($message = "Er is iets fout gegaan.", $code = 0, Exception $previous = null) + { + parent::__construct($message, $code, $previous); } - public function getMessage() { - return $this->message; + public function getClass() { + return "settings-message-angry"; } } @@ -94,24 +93,19 @@ function updateSettings() { $stmt->bindValue(":bio", test_input($_POST["bio"])); $stmt->bindValue(":userID", $_SESSION["userID"]); $stmt->execute(); - - return new settingsMessage("happy", "Instellingen zijn opgeslagen."); + throw new HappyWarning("Instellingen zijn opgeslagen."); } function changePassword() { $user = getPasswordHash(); if (password_verify($_POST["password-old"], $user["password"])) { if ($_POST["password-new"] == $_POST["password-confirm"] && (strlen($_POST["password-new"]) >= 8)) { - if (doChangePassword()) { - return new settingsMessage("happy", "Wachtwoord gewijzigd."); - } else { - return new settingsMessage("angry", "Er is iets mis gegaan."); - } + doChangePassword(); } else { - return new settingsMessage("angry", "Wachtwoorden komen niet oveen."); + throw new AngryWarning("Wachtwoorden komen niet overeen."); } } else { - return new settingsMessage("angry", "Oud wachtwoord niet correct."); + throw new AngryWarning("Oud wachtwoord niet correct."); } } @@ -129,7 +123,12 @@ function doChangePassword() { $stmt->bindParam(":new_password", $hashed_password); $stmt->bindParam(":userID", $_SESSION["userID"]); $stmt->execute(); - return $stmt->rowCount(); + + if ($stmt->rowCount()) { + throw new HappyWarning("Wachtwoord gewijzigd."); + } else { + throw new AngryWarning(); + } } function changeEmail() { @@ -138,20 +137,13 @@ function changeEmail() { $email = strtolower($_POST["email"]); if (filter_var($email, FILTER_VALIDATE_EMAIL)) { //check if email exists - if (emailIsAvailableInDatabase($email)) { - if (doChangeEmail($email)) { - return new settingsMessage("happy", "Emailadres is veranderd."); - } else { - return new settingsMessage("angry", "Er is iets mis gegaan."); - } - } else { - return new settingsMessage("angry", "Emailadres bestaat al."); - } + emailIsAvailableInDatabase($email); + doChangeEmail($email); } else { - return new settingsMessage("angry", "Geef een geldig emailadres."); + throw new AngryWarning("Geef een geldig emailadres"); } } else { - return new settingsMessage("angry", "Emailadressen komen niet overeen."); + throw new AngryWarning("Emailadressen komen niet overeen."); } } @@ -167,7 +159,9 @@ function emailIsAvailableInDatabase($email) { $stmt->bindParam(":email", $email); $stmt->execute(); - return !$stmt->rowCount(); + if ($stmt->rowCount()) { + throw new AngryWarning("Emailadres wordt al gebruikt."); + } } function doChangeEmail($email) { @@ -182,18 +176,24 @@ function doChangeEmail($email) { $stmt->bindParam(":email", $email); $stmt->bindParam(":userID", $_SESSION["userID"]); $stmt->execute(); - return $stmt->rowCount(); +// return $stmt->rowCount(); + + if ($stmt->rowCount()) { + throw new HappyWarning("Emailadres is veranderd."); + } else { + throw new AngryWarning(); + } } -function updateProfilePicture() { +function updateAvatar() { $profilePictureDir = "/var/www/html/public/"; $relativePath = "uploads/profilepictures/" . $_SESSION["userID"] . "_" . basename($_FILES["pp"]["name"]); - removeOldProfilePicture(); + removeOldAvatar(); move_uploaded_file($_FILES['pp']['tmp_name'], $profilePictureDir . $relativePath); - setProfilePictureToDatabase("../" . $relativePath); + setAvatarToDatabase("../" . $relativePath); } -function removeOldProfilePicture() { +function removeOldAvatar() { $stmt = $GLOBALS["db"]->prepare(" SELECT `profilepicture` @@ -205,20 +205,22 @@ function removeOldProfilePicture() { $stmt->bindParam(":userID", $_SESSION["userID"]); $stmt->execute(); $old_avatar = $stmt->fetch()["profilepicture"]; - unlink("/var/www/html/public/uploads/" . $old_avatar); + if ($old_avatar != NULL) { + unlink("/var/www/html/public/uploads/" . $old_avatar); + } } -function setProfilePictureToDatabase($url) { +function setAvatarToDatabase($url) { $stmt = $GLOBALS["db"]->prepare(" UPDATE `user` SET - `profilepicture` = :profilePicture + `profilepicture` = :avatar WHERE `userID` = :userID "); - $stmt->bindParam(":profilePicture", $url); + $stmt->bindParam(":avatar", $url); $stmt->bindParam(":userID", $_SESSION["userID"]); $stmt->execute(); } \ No newline at end of file diff --git a/website/views/settings-view.php b/website/views/settings-view.php index 1fa5278..fe9c6da 100644 --- a/website/views/settings-view.php +++ b/website/views/settings-view.php @@ -6,8 +6,8 @@ $settings = getSettings();
    getClass()."'>". - $result->getMessage(). + echo "
    ". + $alertMessage . "
    "; } ?> -- 2.49.1 From 4579b98eb832a53d6fbca0f7a3d2902ad6c6f712 Mon Sep 17 00:00:00 2001 From: Marijn Jansen Date: Tue, 24 Jan 2017 13:54:08 +0100 Subject: [PATCH 051/256] Checks and resize on profile pictures :) --- website/public/settings.php | 10 +++---- website/queries/settings.php | 54 ++++++++++++++++++++++++------------ 2 files changed, 41 insertions(+), 23 deletions(-) diff --git a/website/public/settings.php b/website/public/settings.php index 41affe6..e40f042 100644 --- a/website/public/settings.php +++ b/website/public/settings.php @@ -12,28 +12,26 @@ getClass(); $alertMessage = $w->getMessage(); } diff --git a/website/queries/settings.php b/website/queries/settings.php index ef718a3..965665a 100644 --- a/website/queries/settings.php +++ b/website/queries/settings.php @@ -1,6 +1,5 @@ bindValue(":bio", test_input($_POST["bio"])); $stmt->bindValue(":userID", $_SESSION["userID"]); $stmt->execute(); - throw new HappyWarning("Instellingen zijn opgeslagen."); + throw new HappyAlert("Instellingen zijn opgeslagen."); } function changePassword() { @@ -102,10 +101,10 @@ function changePassword() { if ($_POST["password-new"] == $_POST["password-confirm"] && (strlen($_POST["password-new"]) >= 8)) { doChangePassword(); } else { - throw new AngryWarning("Wachtwoorden komen niet overeen."); + throw new AngryAlert("Wachtwoorden komen niet overeen."); } } else { - throw new AngryWarning("Oud wachtwoord niet correct."); + throw new AngryAlert("Oud wachtwoord niet correct."); } } @@ -125,9 +124,9 @@ function doChangePassword() { $stmt->execute(); if ($stmt->rowCount()) { - throw new HappyWarning("Wachtwoord gewijzigd."); + throw new HappyAlert("Wachtwoord gewijzigd."); } else { - throw new AngryWarning(); + throw new AngryAlert(); } } @@ -140,10 +139,10 @@ function changeEmail() { emailIsAvailableInDatabase($email); doChangeEmail($email); } else { - throw new AngryWarning("Geef een geldig emailadres"); + throw new AngryAlert("Geef een geldig emailadres"); } } else { - throw new AngryWarning("Emailadressen komen niet overeen."); + throw new AngryAlert("Emailadressen komen niet overeen."); } } @@ -160,7 +159,7 @@ function emailIsAvailableInDatabase($email) { $stmt->bindParam(":email", $email); $stmt->execute(); if ($stmt->rowCount()) { - throw new AngryWarning("Emailadres wordt al gebruikt."); + throw new AngryAlert("Emailadres wordt al gebruikt."); } } @@ -179,18 +178,22 @@ function doChangeEmail($email) { // return $stmt->rowCount(); if ($stmt->rowCount()) { - throw new HappyWarning("Emailadres is veranderd."); + throw new HappyAlert("Emailadres is veranderd."); } else { - throw new AngryWarning(); + throw new AngryAlert(); } } function updateAvatar() { $profilePictureDir = "/var/www/html/public/"; - $relativePath = "uploads/profilepictures/" . $_SESSION["userID"] . "_" . basename($_FILES["pp"]["name"]); + $relativePath = "uploads/profilepictures/" . $_SESSION["userID"] . "_avatar.png"; + + checkAvatarSize($_FILES["pp"]["tmp_name"]); + $scaledImg = scaleAvatar($_FILES["pp"]["tmp_name"]); removeOldAvatar(); - move_uploaded_file($_FILES['pp']['tmp_name'], $profilePictureDir . $relativePath); + imagepng($scaledImg, $profilePictureDir . $relativePath); setAvatarToDatabase("../" . $relativePath); + throw new HappyAlert("Profielfoto veranderd."); } function removeOldAvatar() { @@ -210,7 +213,7 @@ function removeOldAvatar() { } } -function setAvatarToDatabase($url) { +function setAvatarToDatabase(string $url) { $stmt = $GLOBALS["db"]->prepare(" UPDATE `user` @@ -223,4 +226,21 @@ function setAvatarToDatabase($url) { $stmt->bindParam(":avatar", $url); $stmt->bindParam(":userID", $_SESSION["userID"]); $stmt->execute(); +} + +function checkAvatarSize(string $img) { + $minResolution = 200; + $imgSize = getimagesize($img); + if ($imgSize[0] < $minResolution or $imgSize[1] < $minResolution) { + throw new AngryAlert("Afbeelding te klein, minimaal 200x200 pixels."); + } +} + +function scaleAvatar(string $imgLink, int $newWidth = 600) { + $img = imagecreatefromstring(file_get_contents($imgLink)); + if ($img) { + return imagescale($img, $newWidth); + } else { + throw new AngryAlert("Afbeelding wordt niet ondersteund."); + } } \ No newline at end of file -- 2.49.1 From c1359920e067347e3fe0ed15b108e91cc43b9148 Mon Sep 17 00:00:00 2001 From: Marijn Jansen Date: Tue, 24 Jan 2017 14:00:55 +0100 Subject: [PATCH 052/256] New Standard avatar --- website/public/img/avatar-standard.png | Bin 0 -> 100475 bytes website/public/img/notbad.jpg | Bin 24079 -> 0 bytes website/queries/friendship.php | 4 ++-- website/queries/header.php | 2 +- website/queries/user.php | 2 +- website/views/chat-view.php | 2 +- website/views/menu.php | 4 ++-- 7 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 website/public/img/avatar-standard.png delete mode 100644 website/public/img/notbad.jpg diff --git a/website/public/img/avatar-standard.png b/website/public/img/avatar-standard.png new file mode 100644 index 0000000000000000000000000000000000000000..21ab818f1c31fc72ae9088b3620386b5cd28d7be GIT binary patch literal 100475 zcmeFa1yogC*EW3UL#LFYba!``2!ep5N*ziXkrL?+0qIf^0TGb~QMwxe6$wcZ5fubc zP>_Ef@8Y?i`+0re|BHY8V|d08w|lR(_TJZ;Yp!cva~_P*JFP)XKu>@`Ac#+Ds_G*U zm?r2yNK7~*giRU;f8o1pnqER62r1EjFc8_fvIo}Po7m)j)=H+RO9Dk_Zb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lZjqf+;iqHT6OU%=&=!w(9-++9l_u(JEBDxP}>H zs%Al3QsA>o&oKJ=a6Uq0_{q{qYME3(j_?Xy@@mgU@mtR5x@k$3i!lXT(q=jYB+~x% zp|Dt3u*hPzQMtcT(=-BPF;OwUl0{h>OL1iVr-aWo?X4(~TFznM!Lso|z4m|))P3$= oRx21+z$wg-658IfX89j4lh0(a@?v>%4ikPhSlU@s)4gK;2hxM~*Z=?k literal 0 HcmV?d00001 diff --git a/website/public/img/notbad.jpg b/website/public/img/notbad.jpg deleted file mode 100644 index eeea126059e5143b8eda2a1cc77cbc04ff3150e7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24079 zcmdSBbyOV7+Be!WxVyW%6I_EsaCZ&vuE8}yf&_PhyITmsJ-9=VKyVL15^{&^bKZ0I zPTsZdckf?c)2pee=l5tmRozuxGd~x9ZUE@=(sI%O2m}ITA%DQn6+i-jhlPcMg@K2I zgF`@oM?}U(K}JGCCcwl(!zLjlBPAguCMKt5r6Z?grXnV$=Vf4K=iuh%CZppQ=HnD% z<>Kai6aqp(KtM)9#z#TH=cFK};QT*6e)a$u@L(OV4ipFj0AqllFhD>103rYcfT1AP z{^x*!1w%o@JrW5a^$_BJNB{r@4TgaQ{agl+A@yK%D0Bb-y$||t#Q!a2v9_cmWFTsHtW-Q$}-{Rgnn##=n9 z$?**UEwVQ`gz>q>JOsPpYnt#omLi@+7`Y=?3_=mXNt%$|-T)STUH)JuTuR1A?Y|;M zrA$fH4I~REul^z0E%iJiT*bj8ZQ%EBT@HbJ-FIOHwXYf`2Ge0 z{DrKOgrEJYhs(u=WLs-a)^8|$QcPcd*I(5jun$EM0J8rV&woRokmCC>(Eh4{+T0E2 zz5!r5zy3GiukwzN_jTyzh#gOM9=Jg3nK-=x0yzp@I*!B!&_SB`8=g2a6YDwgE*CYL zo}d_cj0>hMy9jBF9>A|mOeF@hcctnXNLe3R@SU1K`vSz z)S!Zk6S>?)xfkv~;Q+tVQw^w1K<6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1v9K=1aJWP{Zvyv^pxEDZG?;Sm=oBsg+08)P2rW+^qe02SE*X{Oy==SOfcZolx z?oZWCU*0%zuX+df8vjgccIC zE>{Vp3eQF$@st;=$>Ljb-<~J10#Qv{`$cX23fs)(F&M<=R?lT$L%5VU&$R_1a;M)yXgLRMOF5Qa({16+$G_3ucwnjNd04KwkT~@ zZ Date: Tue, 24 Jan 2017 14:26:15 +0100 Subject: [PATCH 053/256] FINALLY FIXED THE UNREAD CHAT MESSAGES! --- website/public/API/loadChatNotifications.php | 2 +- website/public/API/loadMessages.php | 2 ++ website/public/js/chat.js | 4 +-- website/public/js/notifications.js | 33 ++++++++++++++--- website/public/styles/chat.css | 38 ++++++++++++-------- website/public/styles/main.css | 20 +++++++++++ website/public/styles/menu.css | 10 ------ website/queries/friendship.php | 33 +++++++++++++++++ website/queries/private_message.php | 35 ++++++++++++++++++ website/views/chat-view.php | 13 ++++--- website/views/menu.php | 6 +++- website/views/notification-center.php | 10 +++++- 12 files changed, 167 insertions(+), 39 deletions(-) diff --git a/website/public/API/loadChatNotifications.php b/website/public/API/loadChatNotifications.php index 3b5835f..1415a2e 100644 --- a/website/public/API/loadChatNotifications.php +++ b/website/public/API/loadChatNotifications.php @@ -3,6 +3,6 @@ session_start(); require_once ("../../queries/connect.php"); -require_once ("../../queries/friendship.php"); +require_once ("../../queries/private_message.php"); echo selectAllUnreadChat(); \ No newline at end of file diff --git a/website/public/API/loadMessages.php b/website/public/API/loadMessages.php index e30acc8..a02de26 100644 --- a/website/public/API/loadMessages.php +++ b/website/public/API/loadMessages.php @@ -5,9 +5,11 @@ session_start(); require_once("../../queries/connect.php"); require_once("../../queries/private_message.php"); require_once("../../queries/checkInput.php"); +require_once("../../queries/friendship.php"); if (isset($_POST["lastID"]) && $_POST["lastID"] != "") { echo getNewChatMessages(test_input($_POST["lastID"]), test_input($_POST["destination"])); } else { echo getOldChatMessages(test_input($_POST["destination"])); + setLastVisited(test_input($_POST["destination"])); } \ No newline at end of file diff --git a/website/public/js/chat.js b/website/public/js/chat.js index 6c420a1..3c839e4 100644 --- a/website/public/js/chat.js +++ b/website/public/js/chat.js @@ -53,8 +53,8 @@ function switchUser(userID) { $(".destinationID").val(userID); $("#chat-history").html(""); $("#lastID").val(""); - $(".chat-left .friend-item").removeClass("active-friend-chat"); - $(".chat-left #friend-item-" + userID).addClass("active-friend-chat"); + $("#chat-recent-panel .friend-item").removeClass("active-friend-chat"); + $("#chat-left #friend-item-" + userID).addClass("active-friend-chat"); } function sayEmpty() { diff --git a/website/public/js/notifications.js b/website/public/js/notifications.js index 51a8c06..e3476b2 100644 --- a/website/public/js/notifications.js +++ b/website/public/js/notifications.js @@ -1,7 +1,7 @@ -function showNotifications(notifications, id) { - $("#" + id).html(""); +function showFriendNotifications(notifications) { + $("#friendrequestslist").html(""); for (i in notifications) { - $("#" + id).append(" \ + $("#friendrequestslist").append(" \

  • \
    \ \ + \ +
  • \ + "); + } +} + function loadNotifications() { $.post( "API/loadFriendRequestNotifications.php" ).done(function(data) { if (data && data != "[]") { - showNotifications(JSON.parse(data), "friendrequestslist"); + showFriendNotifications(JSON.parse(data)); } }); $.post( "API/loadChatNotifications.php" ).done(function(data) { if (data && data != "[]") { - showNotifications(JSON.parse(data), "unreadChatlist"); + showChatNotifications(JSON.parse(data)); } }); diff --git a/website/public/styles/chat.css b/website/public/styles/chat.css index 16505f5..6822d21 100644 --- a/website/public/styles/chat.css +++ b/website/public/styles/chat.css @@ -1,34 +1,38 @@ /* Overall chat-screen */ .chat { position: fixed; + top: 80px; left: 256px; - padding: 20px 0; width: calc(100% - 256px); height: calc(100% - 120px); - display: inline-flex; + + padding: 20px 0; + + display: inline-block; } -.chat-left { +#chat-recent-panel { width: 256px; height: calc(100% - 100px); - margin: 0 10px; - overflow-y: auto; -} -.chat-right { - width: calc(100% - 256px - 40px); - height: calc(100% - 80px); - margin-right: 10px; + display: inline-block; + + overflow-y: auto; } /* Chat history. */ -.chat-history { +#chat-history { overflow-y: auto; overflow-x: hidden; - height: 100%; + + width: calc(100% - 256px - 75px); + height: calc(100% - 80px); + padding: 10px; + display: inline-block; + word-wrap: break-word; } @@ -36,7 +40,13 @@ .chat-message { width: 100%; min-height: 40px; - padding-top: 10px; + padding: 10px 0; + clear: both; +} + +.chat-message::after { + content: ''; + display: table; clear: both; } @@ -63,7 +73,7 @@ /* Chat reply field */ .chat-field { - width: 100%; + width: calc(100% - 10px); display: table; } diff --git a/website/public/styles/main.css b/website/public/styles/main.css index 3e9b51d..8c50b19 100644 --- a/website/public/styles/main.css +++ b/website/public/styles/main.css @@ -242,3 +242,23 @@ div[data-title]:hover:after { line-height: normal; font-family: Arial, sans-serif; } + +.friend { + +} + + +.friend-item, .group-item { + cursor: pointer; + transition-duration: 250ms; +} + +.friend-item:hover, .group-item:hover { + background: #FBC02D; + box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); +} + +.friend-name { + display: inline-block; + vertical-align: middle; +} diff --git a/website/public/styles/menu.css b/website/public/styles/menu.css index 25e4b91..ce294da 100644 --- a/website/public/styles/menu.css +++ b/website/public/styles/menu.css @@ -34,16 +34,6 @@ cursor: pointer; } -.friend-item, .group-item { - cursor: pointer; - transition-duration: 250ms; -} - -.friend-item:hover, .group-item:hover { - background: #FBC02D; - box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); -} - .menu button { background: none; color: inherit; diff --git a/website/queries/friendship.php b/website/queries/friendship.php index 9a3a37c..fff3754 100644 --- a/website/queries/friendship.php +++ b/website/queries/friendship.php @@ -5,6 +5,7 @@ function selectAllFriends($userID) { SELECT `userID`, `username`, + LEFT(CONCAT(`user`.`fname`, ' ', `user`.`lname`), 20) as `name`, IFNULL( `profilepicture`, '../img/notbad.jpg' @@ -36,6 +37,7 @@ function selectAllFriendRequests() { SELECT `userID`, `username`, + LEFT(CONCAT(`user`.`fname`, ' ', `user`.`lname`), 20) as `name`, IFNULL( `profilepicture`, '../img/notbad.jpg' @@ -60,4 +62,35 @@ function selectAllFriendRequests() { $stmt->execute(); return json_encode($stmt->fetchAll()); +} + + +function setLastVisited($friend) { + $stmt = $GLOBALS["db"]->prepare(" + UPDATE + `friendship` + SET `friendship`.chatLastVisted1=( + CASE `user1ID` = :sessionUser + WHEN TRUE THEN NOW() + WHEN FALSE THEN `chatLastVisted1` + END + ), + `friendship`.`chatLastVisted2`=( + CASE `user2ID` = :sessionUser + WHEN TRUE THEN NOW() + WHEN FALSE THEN `chatLastVisted2` + END + ) + WHERE + `user1ID` = :sessionUser AND + `user2ID` = :friend OR + `user2ID` = :sessionUser AND + `user1ID` = :friend; + "); + + $stmt->bindParam(':sessionUser', $_SESSION["userID"], PDO::PARAM_INT); + $stmt->bindParam(':friend', $friend, PDO::PARAM_INT); + $stmt->execute(); + + return $stmt; } \ No newline at end of file diff --git a/website/queries/private_message.php b/website/queries/private_message.php index 46c21a3..2bb89ab 100644 --- a/website/queries/private_message.php +++ b/website/queries/private_message.php @@ -74,3 +74,38 @@ function getNewChatMessages($lastID, $destination) { return json_encode($stmt->fetchAll()); } + + +function selectAllUnreadChat() { + $stmt = $GLOBALS["db"]->prepare(" + SELECT + LEFT(CONCAT(`user`.`fname`, ' ', `user`.`lname`), 20) as `name`, + IFNULL( + `profilepicture`, + '../img/notbad.jpg' + ) AS profilepicture, + LEFT(`private_message`.`content`, 20) as `content` + FROM + `private_message`, + `friendship`, + `user` + WHERE + (`friendship`.user2ID = `private_message`.`origin` AND + `friendship`.user1ID = `private_message`.`destination` AND + `friendship`.chatLastVisted1 < `private_message`.`creationdate` OR + `friendship`.user1ID = `private_message`.`origin` AND + `friendship`.user2ID = `private_message`.`destination` AND + `friendship`.chatLastVisted2 < `private_message`.`creationdate`) AND + `private_message`.`origin` = `user`.`userID` AND + `private_message`.`destination` = :userID AND + `user`.`role` != 'banned' + + GROUP BY `user`.`userID` + "); + + $stmt->bindParam(':userID', $_SESSION["userID"]); + + $stmt->execute(); + + return json_encode($stmt->fetchAll()); +} \ No newline at end of file diff --git a/website/views/chat-view.php b/website/views/chat-view.php index 549a5ff..135f7f4 100644 --- a/website/views/chat-view.php +++ b/website/views/chat-view.php @@ -1,6 +1,6 @@
    - \ No newline at end of file -- 2.49.1 From dc11830c80472bbb2006473b995df2cc28754c94 Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Tue, 24 Jan 2017 14:32:43 +0100 Subject: [PATCH 054/256] Fixed name length --- website/queries/friendship.php | 4 ++-- website/queries/private_message.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/website/queries/friendship.php b/website/queries/friendship.php index dc1ce46..be0401a 100644 --- a/website/queries/friendship.php +++ b/website/queries/friendship.php @@ -5,7 +5,7 @@ function selectAllFriends($userID) { SELECT `userID`, `username`, - LEFT(CONCAT(`user`.`fname`, ' ', `user`.`lname`), 20) as `name`, + LEFT(CONCAT(`user`.`fname`, ' ', `user`.`lname`), 15) as `name`, IFNULL( `profilepicture`, '../img/avatar-standard.png' @@ -37,7 +37,7 @@ function selectAllFriendRequests() { SELECT `userID`, `username`, - LEFT(CONCAT(`user`.`fname`, ' ', `user`.`lname`), 20) as `name`, + LEFT(CONCAT(`user`.`fname`, ' ', `user`.`lname`), 15) as `name`, IFNULL( `profilepicture`, '../img/avatar-standard.png' diff --git a/website/queries/private_message.php b/website/queries/private_message.php index 2bb89ab..4fbb55d 100644 --- a/website/queries/private_message.php +++ b/website/queries/private_message.php @@ -79,12 +79,12 @@ function getNewChatMessages($lastID, $destination) { function selectAllUnreadChat() { $stmt = $GLOBALS["db"]->prepare(" SELECT - LEFT(CONCAT(`user`.`fname`, ' ', `user`.`lname`), 20) as `name`, + LEFT(CONCAT(`user`.`fname`, ' ', `user`.`lname`), 15) as `name`, IFNULL( `profilepicture`, '../img/notbad.jpg' ) AS profilepicture, - LEFT(`private_message`.`content`, 20) as `content` + LEFT(`private_message`.`content`, 15) as `content` FROM `private_message`, `friendship`, -- 2.49.1 From d44ddf2793168c126329e31f9e1c30bb9804343a Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Tue, 24 Jan 2017 14:36:27 +0100 Subject: [PATCH 055/256] Added functionality for add friend buttons. --- website/public/edit_friendship.php | 30 ++++++++++++ website/public/profile.php | 5 +- website/public/styles/profile.css | 3 +- website/queries/friendship.php | 78 +++++++++++++++++++++++++++++- website/queries/user.php | 52 +++++++++++++++----- website/views/profile.php | 25 +++++++--- 6 files changed, 170 insertions(+), 23 deletions(-) create mode 100644 website/public/edit_friendship.php diff --git a/website/public/edit_friendship.php b/website/public/edit_friendship.php new file mode 100644 index 0000000..d88e264 --- /dev/null +++ b/website/public/edit_friendship.php @@ -0,0 +1,30 @@ +prepare(" SELECT @@ -21,8 +23,8 @@ function selectAllFriends($userID) { `friendship`.`user2ID` = `user`.`userID` OR `friendship`.`user2ID` = :userID AND `friendship`.`user1ID` = `user`.`userID`) AND - `role` != 5 AND - `status` = 1 + `role` != 'banned' AND + `status` = 'confirmed' "); $stmt->bindParam(':userID', $userID, PDO::PARAM_INT); @@ -60,4 +62,76 @@ function selectAllFriendRequests() { $stmt->execute(); return json_encode($stmt->fetchAll()); +} + +function getFriendshipStatus($userID) { + $stmt = $GLOBALS["db"]->prepare(" + SELECT + CASE `status` IS NULL + WHEN TRUE THEN 0 + WHEN FALSE THEN + CASE `status` = 'confirmed' + WHEN TRUE THEN + 1 + WHEN FALSE THEN + CASE `user1ID` = :me AND `user2ID` = :other + WHEN TRUE THEN + 2 + WHEN FALSE THEN + 3 + END + END + END AS `friend_state` + FROM + `friendship` + WHERE + `user1ID` = :other AND `user2ID` = :me OR + `user1ID` = :me AND `user2ID` = :other + "); + + $stmt->bindParam(':me', $_SESSION["userID"], PDO::PARAM_INT); + $stmt->bindParam(':other', $userID, PDO::PARAM_INT); + $stmt->execute(); + return $stmt->fetch()["friend_state"]; +} + +function requestFriendship($userID) { + $stmt = $GLOBALS["db"]->prepare(" + INSERT INTO `friendship` (user1ID, user2ID) + VALUES (:user1, :user2) + "); + + $stmt->bindParam(':user1', $_SESSION["userID"], PDO::PARAM_INT); + $stmt->bindParam(':user2', $userID, PDO::PARAM_INT); + $stmt->execute(); +} + +function removeFriendship($userID) { + $stmt = $GLOBALS["db"]->prepare(" + DELETE FROM `friendship` + WHERE + `user1ID` = :user1 AND + `user2ID` = :user2 OR + `user1ID` = :user2 AND + `user2ID` = :user1 + "); + + $stmt->bindParam(':user1', $_SESSION["userID"], PDO::PARAM_INT); + $stmt->bindParam(':user2', $userID, PDO::PARAM_INT); + $stmt->execute(); +} + +function acceptFriendship($userID) { + $stmt = $GLOBALS["db"]->prepare(" + UPDATE `friendship` + SET `status`='confirmed' + WHERE + `user1ID` = :user1 AND + `user2ID` = :user2 + LIMIT 1 + "); + + $stmt->bindParam(':user1', $userID, PDO::PARAM_INT); + $stmt->bindParam(':user2', $_SESSION["userID"], PDO::PARAM_INT); + $stmt->execute(); } \ No newline at end of file diff --git a/website/queries/user.php b/website/queries/user.php index 114d673..04f379e 100644 --- a/website/queries/user.php +++ b/website/queries/user.php @@ -17,27 +17,53 @@ function getUserID($username) { return $stmt->fetch()["userID"]; } -function selectUser($userID) { +function getUsername($userID) { $stmt = $GLOBALS["db"]->prepare(" SELECT - `username`, - IFNULL( - `profilepicture`, - '../img/notbad.jpg' - ) AS profilepicture, - `bio`, - `role`, - `onlinestatus`, - `loggedin`, - `fname`, - `lname` + `username` FROM `user` WHERE `userID` = :userID "); - $stmt->bindParam(':userID', $userID, PDO::PARAM_INT); + $stmt->bindParam(':userID', $userID, PDO::PARAM_STR); + $stmt->execute(); + return $stmt->fetch()["username"]; +} + +function selectUser($me, $other) { + $stmt = $GLOBALS["db"]->prepare(" + SELECT + `username`, `birthdate`, `location`, `profilepicture`, `bio`, `user`.`creationdate`, `onlinestatus`, `fname`, `lname`, + CASE `status` IS NULL + WHEN TRUE THEN 0 + WHEN FALSE THEN + CASE `status` = 'confirmed' + WHEN TRUE THEN + 1 + WHEN FALSE THEN + CASE `user1ID` = `userID` AND `user2ID` = :me + WHEN TRUE THEN + 2 + WHEN FALSE THEN + 3 + END + END + END AS `friend_status` + FROM + `user` + LEFT JOIN + `friendship` + ON + `user1ID` = `userID` AND `user2ID` = :me OR + `user1ID` = :me AND `user2ID` = `userID` + WHERE + `user`.`userID` = :other + "); + + $stmt->bindParam(':me', $me, PDO::PARAM_INT); + $stmt->bindParam(':other', $other, PDO::PARAM_INT); $stmt->execute(); return $stmt->fetch(); } diff --git a/website/views/profile.php b/website/views/profile.php index 19bd908..83dbca7 100644 --- a/website/views/profile.php +++ b/website/views/profile.php @@ -1,11 +1,24 @@
    "> -
    -

    Als vriend toevoegen

    -
    -

    -
    + +
    + + "; + } else if($user["friend_status"] == 1) { + echo ""; + } else if($user["friend_status"] == 2) { + echo ""; + echo ""; + } else if($user["friend_status"] == 3) { + echo ""; + } + ?> + +

    +

    @@ -14,7 +27,7 @@

    fetch()) { - echo "${friend["username"]}"; + echo "${friend["username"]}"; } -- 2.49.1 From 86b97cc186efe69bcbc4b04b2092ed77b5a11931 Mon Sep 17 00:00:00 2001 From: Marijn Jansen Date: Tue, 24 Jan 2017 14:47:38 +0100 Subject: [PATCH 056/256] Max file size for gifs. --- website/queries/settings.php | 17 +++++++++++++---- website/views/settings-view.php | 9 +++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/website/queries/settings.php b/website/queries/settings.php index 965665a..d3985c7 100644 --- a/website/queries/settings.php +++ b/website/queries/settings.php @@ -186,12 +186,21 @@ function doChangeEmail($email) { function updateAvatar() { $profilePictureDir = "/var/www/html/public/"; - $relativePath = "uploads/profilepictures/" . $_SESSION["userID"] . "_avatar.png"; + $tmpImg = $_FILES["pp"]["tmp_name"]; - checkAvatarSize($_FILES["pp"]["tmp_name"]); - $scaledImg = scaleAvatar($_FILES["pp"]["tmp_name"]); + checkAvatarSize($tmpImg); removeOldAvatar(); - imagepng($scaledImg, $profilePictureDir . $relativePath); + if (getimagesize($tmpImg)["mime"] == "image/gif") { + if ($_FILES["pp"]["size"] > 4000000) { + throw new AngryAlert("Bestand is te groot, maximaal 4MB toegestaan."); + } + $relativePath = "uploads/profilepictures/" . $_SESSION["userID"] . "_avatar.gif"; + move_uploaded_file($tmpImg, $profilePictureDir . $relativePath); + } else { + $relativePath = "uploads/profilepictures/" . $_SESSION["userID"] . "_avatar.png"; + $scaledImg = scaleAvatar($tmpImg); + imagepng($scaledImg, $profilePictureDir . $relativePath); + } setAvatarToDatabase("../" . $relativePath); throw new HappyAlert("Profielfoto veranderd."); } diff --git a/website/views/settings-view.php b/website/views/settings-view.php index fe9c6da..66513fc 100644 --- a/website/views/settings-view.php +++ b/website/views/settings-view.php @@ -6,9 +6,9 @@ $settings = getSettings();

    ". - $alertMessage . - "
    "; + echo "
    + $alertMessage +
    "; } ?>
    @@ -81,7 +81,8 @@ $settings = getSettings();
  • -- 2.49.1 From 4967ab6ea07ed2d20d4bd4909f946ae90ccb9936 Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Tue, 24 Jan 2017 15:01:55 +0100 Subject: [PATCH 057/256] Made some small changes for Lars. --- website/queries/user.php | 13 ++++++++++++- website/views/profile.php | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/website/queries/user.php b/website/queries/user.php index 15b7fb1..ed431f6 100644 --- a/website/queries/user.php +++ b/website/queries/user.php @@ -35,7 +35,18 @@ function getUsername($userID) { function selectUser($me, $other) { $stmt = $GLOBALS["db"]->prepare(" SELECT - `username`, `birthdate`, `location`, `profilepicture`, `bio`, `user`.`creationdate`, `onlinestatus`, `fname`, `lname`, + `username`, + `birthdate`, + `location`, + IFNULL( + `profilepicture`, + '../img/avatar-standard.png' + ) AS profilepicture, + `bio`, + `user`.`creationdate`, + `onlinestatus`, + `fname`, + `lname`, CASE `status` IS NULL WHEN TRUE THEN 0 WHEN FALSE THEN diff --git a/website/views/profile.php b/website/views/profile.php index 83dbca7..2bc0341 100644 --- a/website/views/profile.php +++ b/website/views/profile.php @@ -27,7 +27,7 @@

    fetch()) { - echo "${friend["username"]}"; + echo "${friend["username"]}"; } -- 2.49.1 From 7a19fea5f9d8ce126d4fa6bb3f995eab036f8625 Mon Sep 17 00:00:00 2001 From: Joey Lai Date: Tue, 24 Jan 2017 15:08:24 +0100 Subject: [PATCH 058/256] Redesigned register functions --- website/public/register.php | 93 +++++++++++--- website/public/styles/index.css | 64 ++++------ website/queries/checkInput.php | 206 ++++++++++++++++++++++++-------- website/views/login_head.php | 1 + website/views/register-view.php | 22 ++-- 5 files changed, 267 insertions(+), 119 deletions(-) diff --git a/website/public/register.php b/website/public/register.php index 8c0f8e4..99af6c0 100644 --- a/website/public/register.php +++ b/website/public/register.php @@ -10,33 +10,90 @@ getMessage(); } - checkInputChoice("username", "username"); - checkInputChoice("password", "longerEight"); - checkInputChoice("confirmpassword", ""); - matchPassword(); - checkInputChoice("location", "lettersAndSpace"); - checkInputChoice("email", "email"); - registerCheck(); + try { + $surname = test_input(($_POST["surname"])); + checkInputChoice($surname, "lettersAndSpaces"); + } + catch(lettersAndSpacesException $e){ + $correct = false; + $surnameErr = $e->getMessage(); + } + + try{ + $bday = test_input(($_POST["bday"])); + checkInputChoice($bday, "bday"); + } catch(bdayException $e){ + $correct = false; + $bdayErr = $e->getMessage(); + } + + try{ + $username = test_input(($_POST["username"])); + checkInputChoice($username, "username"); + } catch(usernameException $e){ + $correct = false; + $usernameErr = $e->getMessage(); + } + + try{ + $password = test_input(($_POST["password"])); + checkInputChoice($password, "longerEight"); + matchPassword(); + } catch(passwordException $e){ + $correct = false; + $passwordErr = $e->getMessage(); + } catch(confirmPasswordException $e){ + $correct = false; + $confirmPasswordErr = $e->getMessage(); + } + + try{ + $location = test_input(($_POST["location"])); + checkInputChoice($location, "lettersAndSpaces"); + } catch(lettersAndSpacesException $e){ + $correct = false; + $locationErr = $e->getMessage(); + } + + try{ + $email = test_input(($_POST["email"])); + checkInputChoice($email, "email"); + } catch(emailException $e){ + $correct = false; + $emailErr = $e->getMessage(); + } + + try{ + $captcha = $_POST['g-recaptcha-response']; + checkCaptcha($captcha); + } catch(captchaException $e){ + $correct = false; + $captchaErr = $e->getMessage(); + } + + try { + getIp(); + registerCheck($correct); + } catch(registerException $e){ + $genericErr = $e->getMessage(); + } } /* This view adds register view */ include("../views/register-view.php"); diff --git a/website/public/styles/index.css b/website/public/styles/index.css index a24bdd0..8482cea 100644 --- a/website/public/styles/index.css +++ b/website/public/styles/index.css @@ -4,17 +4,16 @@ a.button { color: black; cursor: pointer; height: 50%; - margin: 8px 0; - padding: 14px 20px; - width: 25%; + padding: 8px 20px; + width: 50%; font-family: Arial; - font-size: 16px; + font-size: 20px; } /* Body */ body { height: 100%; - background-color: #C8CABD; + background-color: #FBC02D; /*background-image: url(http://play.pokemonshowdown.com/fx/client-bg-shaymin.jpg); background-size: cover; background-attachment: fixed;*/ @@ -24,31 +23,14 @@ body { font-family: Arial, sans-serif; } -/* The Close Button */ -.close { - /* Position it in the top right corner outside of the modal */ - color: white; - font-size: 100px; - font-weight: bold; - position: absolute; - right: 25px; - top: 0; -} - -/* Close button on hover */ -.close:hover, -.close:focus { - color: red; - cursor: pointer; -} /* inlogform */ form { /*background-color: #a87a87;*/ border-radius: 12px; - height: 70%; + height: 75%; margin: auto; - width: 70%; + width: 80%; overflow-y:auto; } @@ -72,24 +54,20 @@ input[type=text], input[type=password], input[type=email], input[type="date"] { border-color: #C8CABD; display: inline-block; height: 60%; + font-size: 16px; padding: 8px 20px; margin: 4px 0; - width: 70%; + width: 55%; } -/* -input[type=text], input[type=password], input[type=email], input[type="date"] { - border: 0px; - border-bottom: 4px solid lightgray; - border-radius: 0px; -}*/ button[type=submit] { background-color: #C8CABD; - color: black ; + color: black; cursor: pointer; font-family: Arial; - font-size: 16px; - width: 50%; + font-size: 22px; + height: 30px; + width: 120px; } .error { @@ -106,12 +84,12 @@ label { display: inline-block; position: relative; background-color: #C8CABD; - height: 30px; - width: 90px; - padding: 3px 3px 3px 0px; + height: 25px; + width: 120px; + padding: 3px 3px 3px 3px; text-align: center; - border-radius: 0px 10px 10px 0px; - font-size: 24px; + border-radius: 0px 5px 5px 0px; + font-size: 22px; } .left-arrow:after { @@ -121,9 +99,9 @@ label { right: 100%; top: 0; bottom: 0; - border-top: 15px solid transparent; + border-top: 12px solid transparent; border-right: 20px solid #C8CABD; - border-bottom: 15px solid transparent; + border-bottom: 12px solid transparent; border-left: 0px solid transparent; } @@ -135,7 +113,7 @@ label { /* padding voor login_containers */ .login_containerlogin { - padding:25px; + padding:16px; text-align: center; } @@ -163,7 +141,7 @@ label { margin: 34px auto; overflow-y: auto; padding: 20px; - width: 50%; + width: 45%; } /*.platform { diff --git a/website/queries/checkInput.php b/website/queries/checkInput.php index f711676..cc32626 100644 --- a/website/queries/checkInput.php +++ b/website/queries/checkInput.php @@ -1,97 +1,138 @@ format($format) == $date; +} + /* checks if username exist and if its longer than 6 characters. */ function username($variable){ - if (strlen($GLOBALS[$variable]) < 6) { - $GLOBALS[$variable . "Err"] = "Gebruikersnaam moet minstens 6 karakters bevatten"; - $correct = false; + if (empty($variable)) { + throw new usernameException("Verplicht!"); + } else if (strlen($variable) < 6) { + throw new usernameException("Moet minstens 6 karakters bevatten"); } else if (getExistingUsername() == 1) { - $GLOBALS[$variable . "Err"] = "Gebruikersnaam bestaat al"; - $correct = false; + throw new usernameException("Gebruikersnaam bestaal al"); } } /* checks if an input is longer that 8 characters. */ function longerEight($variable){ - if (strlen($GLOBALS[$variable]) < 8) { - $GLOBALS[$variable . "Err"] = "Moet minstens 8 karakters bevatten"; - $correct = false; + if (empty($variable)) { + throw new passwordException("Verplicht!"); + } else if (strlen($variable) < 8) { + throw new passwordException("Moet minstens 8 karakters bevatten"); } } /* checks if an input is a valid email. */ function validateEmail($variable){ - if (!filter_var($GLOBALS[$variable], FILTER_VALIDATE_EMAIL)) { - $GLOBALS[$variable . "Err"] = "Geldige email invullen!"; - $correct = false; - + if (empty($variable)) { + throw new emailException("Verplicht!"); + } else if (!filter_var($variable, FILTER_VALIDATE_EMAIL)) { + throw new emailException("Geldige email invullen"); } else if (getExistingEmail() == 1){ - $GLOBALS[$variable . "Err"] = "Email bestaat al"; - $correct = false; - + throw new emailException("Email bestaal al!"); } } /* checks if two passwords matches. */ function matchPassword(){ if ($_POST["password"] != $_POST["confirmpassword"]) { - $GLOBALS["confirmpasswordErr"] = "Wachtwoorden matchen niet"; - $GLOBALS["correct"] = false; - + throw new confirmPasswordException("Wachtwoorden matchen niet!"); } } -// Checks if everything is filled in correctly -function registerCheck(){ - if ($GLOBALS["correct"] == false){ - $GLOBALS["genericErr"] = "Bepaalde velden zijn verkeerd of niet ingevuld!"; +/* Checks if captcha is correctly filled in */ +function checkCaptcha($captcha){ + if(!$captcha){ + throw new captchaException("Captcha needs to be filled in!"); + } else { + $response=json_decode(file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=6Lc72xIUAAAAAPizuF3nUbklCPljVCVzgYespz8o&response=".$captcha."&remoteip=".$_SERVER['REMOTE_ADDR'])); + if($response->success==false) { + throw new captchaException("You are a spammer!"); + } + } +} +/* Get ip adres */ +function getIp(){ + if (!empty($_SERVER['HTTP_CLIENT_IP'])) { + $GLOBALS["ip"] = $_SERVER['HTTP_CLIENT_IP']; + } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { + $GLOBALS["ip"] = $_SERVER['HTTP_X_FORWARDED_FOR']; + } else { + $GLOBALS["ip"] = $_SERVER['REMOTE_ADDR']; + } +} + +/* Checks if everything is filled in correctly */ +function registerCheck($status){ + if ($status == false){ + throw new registerException("Bepaalde velden zijn verkeerd of niet ingevuld"); } else { registerAccount(); header("location: login.php"); - } } @@ -102,4 +143,69 @@ function test_input($data) { $data = htmlspecialchars($data); return $data; } + +class lettersAndSpacesException extends Exception +{ + public function __construct($message = "", $code = 0, Exception $previous = null) + { + parent::__construct($message, $code, $previous); + } +} + + +class bdayException extends Exception +{ + public function __construct($message = "", $code = 0, Exception $previous = null) + { + parent::__construct($message, $code, $previous); + } +} + +class usernameException extends Exception +{ + public function __construct($message = "", $code = 0, Exception $previous = null) + { + parent::__construct($message, $code, $previous); + } +} + +class passwordException extends Exception +{ + public function __construct($message = "", $code = 0, Exception $previous = null) + { + parent::__construct($message, $code, $previous); + } +} + +class confirmPasswordException extends Exception +{ + public function __construct($message = "", $code = 0, Exception $previous = null) + { + parent::__construct($message, $code, $previous); + } +} + +class emailException extends Exception +{ + public function __construct($message = "", $code = 0, Exception $previous = null) + { + parent::__construct($message, $code, $previous); + } +} + +class captchaException extends Exception +{ + public function __construct($message = "", $code = 0, Exception $previous = null) + { + parent::__construct($message, $code, $previous); + } +} + +class registerException extends Exception +{ + public function __construct($message = "", $code = 0, Exception $previous = null) + { + parent::__construct($message, $code, $previous); + } +} ?> diff --git a/website/views/login_head.php b/website/views/login_head.php index 26d439e..e983fab 100644 --- a/website/views/login_head.php +++ b/website/views/login_head.php @@ -9,4 +9,5 @@ href="styles/index.css"> + diff --git a/website/views/register-view.php b/website/views/register-view.php index 7d1843b..4c660c9 100644 --- a/website/views/register-view.php +++ b/website/views/register-view.php @@ -41,11 +41,12 @@

    @@ -117,18 +118,23 @@ *
  • - + + + + +
    -
    -- 2.49.1 From fd055e8355e0ad46e43e120dfb6c49f24b35d49b Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Tue, 24 Jan 2017 15:16:15 +0100 Subject: [PATCH 059/256] Fixed bugs --- website/public/API/loadMessages.php | 1 + website/views/chat-view.php | 1 + 2 files changed, 2 insertions(+) diff --git a/website/public/API/loadMessages.php b/website/public/API/loadMessages.php index a02de26..0fdc740 100644 --- a/website/public/API/loadMessages.php +++ b/website/public/API/loadMessages.php @@ -9,6 +9,7 @@ require_once("../../queries/friendship.php"); if (isset($_POST["lastID"]) && $_POST["lastID"] != "") { echo getNewChatMessages(test_input($_POST["lastID"]), test_input($_POST["destination"])); + setLastVisited(test_input($_POST["destination"])); } else { echo getOldChatMessages(test_input($_POST["destination"])); setLastVisited(test_input($_POST["destination"])); diff --git a/website/views/chat-view.php b/website/views/chat-view.php index 9b40f71..598b3ee 100644 --- a/website/views/chat-view.php +++ b/website/views/chat-view.php @@ -16,6 +16,7 @@ // Set default values of a friend. $username = $friend["username"]; + $name = $friend["name"]; $userID = $friend["userID"]; $pf = "img/avatar-standard.png"; -- 2.49.1 From f9f1e2bf173ee75f6eb9dbb8c94e0bd9ef078cf3 Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Tue, 24 Jan 2017 16:40:30 +0100 Subject: [PATCH 060/256] Changed select posts query. --- website/queries/user.php | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/website/queries/user.php b/website/queries/user.php index 18cd3f6..25bbf0e 100644 --- a/website/queries/user.php +++ b/website/queries/user.php @@ -68,18 +68,24 @@ function selectAllUserGroups($userID) { function selectAllUserPosts($userID) { $stmt = $GLOBALS["db"]->prepare(" SELECT - `postID`, - `author`, - `title`, - `content`, - `creationdate` + `postID`, + `author`, + `title`, + CASE LENGTH(`content`) >= 150 + WHEN TRUE THEN + CONCAT(LEFT(`content`, 150), '...') + WHEN FALSE THEN + `content` + END + AS `content`, + `creationdate` FROM - `post` + `post` WHERE - `author` = :userID AND - `groupID` IS NULL + `author` = :userID AND + `groupID` IS NULL ORDER BY - `creationdate` DESC + `creationdate` DESC "); $stmt->bindParam(':userID', $userID, PDO::PARAM_INT); -- 2.49.1 From 70957015ceb57b7d363b9277c17942dee03cd74e Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Tue, 24 Jan 2017 16:51:34 +0100 Subject: [PATCH 061/256] Fixed links to friends on profile page. --- website/views/profile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/views/profile.php b/website/views/profile.php index 19bd908..1080290 100644 --- a/website/views/profile.php +++ b/website/views/profile.php @@ -14,7 +14,7 @@

    fetch()) { - echo "${friend["username"]}"; + echo "${friend["username"]}"; } -- 2.49.1 From b9fc016f7d4545fcc4d7e30ea351e51774f672b8 Mon Sep 17 00:00:00 2001 From: Hendrik Date: Tue, 24 Jan 2017 16:56:04 +0100 Subject: [PATCH 062/256] add post viewing basis, add insert post and comment queries --- website/public/js/masonry.js | 8 +++ website/public/js/profile.js | 0 website/public/profile.php | 4 +- website/public/styles/post-popup.css | 38 +++++++++++ website/queries/post.php | 97 ++++++++++++++++++++++++++++ website/views/post-view.php | 53 +++++++++++++++ website/views/profile.php | 9 +++ 7 files changed, 208 insertions(+), 1 deletion(-) create mode 100644 website/public/js/profile.js create mode 100644 website/public/styles/post-popup.css create mode 100644 website/queries/post.php create mode 100644 website/views/post-view.php diff --git a/website/public/js/masonry.js b/website/public/js/masonry.js index e9419a2..2bddf59 100644 --- a/website/public/js/masonry.js +++ b/website/public/js/masonry.js @@ -73,4 +73,12 @@ function mansonry() { } $("div.posts div.column").width(100/columnCount + "%"); + + $(".post").click(function () { + $(".modal").show(); + }); + + $(".modal-close").click(function () { + $(".modal").hide(); + }); } \ No newline at end of file diff --git a/website/public/js/profile.js b/website/public/js/profile.js new file mode 100644 index 0000000..e69de29 diff --git a/website/public/profile.php b/website/public/profile.php index e4f1452..f7cae2b 100644 --- a/website/public/profile.php +++ b/website/public/profile.php @@ -2,9 +2,10 @@ - + @@ -12,6 +13,7 @@ include("../queries/user.php"); include("../queries/friendship.php"); include("../queries/nicetime.php"); +include("../queries/post.php"); if(empty($_GET["username"])) { $userID = $_SESSION["userID"]; diff --git a/website/public/styles/post-popup.css b/website/public/styles/post-popup.css new file mode 100644 index 0000000..c4a2a4c --- /dev/null +++ b/website/public/styles/post-popup.css @@ -0,0 +1,38 @@ +/* modal based on: http://www.w3schools.com/howto/howto_css_modals.asp */ + +.modal { + /*display: none; !* Hidden by default *!*/ + position: fixed; /* Stay in place */ + z-index: 1; /* Sit on top */ + left: 0; + top: 0; + width: calc(100% - 256px); /* Full width */ + height: calc(100% - 80px); /* Full height */ + overflow: visible; /* Enable scroll if needed */ + background-color: rgb(0,0,0); /* Fallback color */ + background-color: rgba(0,0,0,0.4); /* Black w/ opacity */ +} + +/* Modal Content/Box */ +.modal-content { + background-color: #fefefe; + margin: 15% auto; /* 15% from the top and centered */ + padding: 20px; + border: 1px solid #888; + width: 80%; /* Could be more or less, depending on screen size */ +} + +.modal-close { + color: #aaa; + float: right; + font-size: 28px; + font-weight: bold; + margin: auto; +} + +.modal-close:hover, +.modal-close:focus { + color: black; + text-decoration: none; + cursor: pointer; +} \ No newline at end of file diff --git a/website/queries/post.php b/website/queries/post.php new file mode 100644 index 0000000..0183a5d --- /dev/null +++ b/website/queries/post.php @@ -0,0 +1,97 @@ +prepare(" + SELECT + `user`.`fname`, + `user`.`lname`, + `user`.`username`, + `post`.`groupID`, + `post`.`title`, + `post`.`content`, + `post`.`creationdate` + FROM + `post` + INNER JOIN + `user` + ON + `post`.`author` = `user`. `userID` + WHERE + `post`.`postID` = :postID + "); + + $stmt->bindParam(':postID', $postID); + $stmt->execute(); + return $stmt; +} + +function selectCommentsByPostId($postID) { + $stmt = $GLOBALS["db"]->prepare(" + SELECT + `comment`.`commentID`, + `comment`.`postID`, + `comment`.`author`, + `comment`.`content`, + `comment`.`creationdate`, + `user`.`fname`, + `user`.`lname`, + `user`.`username` + FROM + `comment` + INNER JOIN + `user` + ON + `comment`.`author` = `user`.`userID` + WHERE + `comment`.`postID` = :postID + "); + + $stmt->bindParam(':postID', $postID); + $stmt->execute(); + return $stmt; +} + +function makePost($userID, $groupID, $title, $content) { + $stmt = $GLOBALS["db"]->prepare(" + INSERT INTO + `post` ( + `author`, + `groupID`, + `title`, + `content` + ) + VALUES ( + :userID, + :groupID, + :title, + :content + ) + "); + + $stmt->bindParam(':userID', $userID); + $stmt->bindParam(':groupID', $groupID); + $stmt->bindParam(':title', $title); + $stmt->bindParam(':content', $content); + $stmt->execute(); +} + +function makeComment($postID, $userID, $content) { + $stmt = $_GLOBAL["db"]->prepare(" + INSERT INTO + `comment` ( + `postID`, + `author`, + `content` + ) + VALUES ( + :postID, + :userID, + :content + ) + "); + + $stmt->bindParam(':postID', $postID); + $stmt->bindParam(':userID', $userID); + $stmt->bindParam(':content', $content); + $stmt->execute(); +} \ No newline at end of file diff --git a/website/views/post-view.php b/website/views/post-view.php new file mode 100644 index 0000000..2450468 --- /dev/null +++ b/website/views/post-view.php @@ -0,0 +1,53 @@ +fetch(PDO::FETCH_ASSOC); + $fullname = $post['fname'] . " " . $post['lname'] . " (" . $post['username'] . ")"; +?> + +

    +

    + +
    + +
    +

    +
    + +
    +
    +
    +
    + + +
    + + fetch(PDO::FETCH_ASSOC)) { + $commentauthor = $comment['fname'] . " " . $comment['lname'] . " (" . $comment['username'] . ")"; + $commentdate = $comment['creationdate']; + $commentnicetime = nicetime($commentdate); + $commentcontent = $comment['content']; + + echo(" +
    +
    + $commentauthor + + $commentnicetime + +
    +
    + $commentcontent +
    +
    + "); + } + ?> +
    diff --git a/website/views/profile.php b/website/views/profile.php index 19bd908..6d69437 100644 --- a/website/views/profile.php +++ b/website/views/profile.php @@ -66,4 +66,13 @@ } ?>
    + + \ No newline at end of file -- 2.49.1 From de03d8799a2ce018e3f62ac8da30459ef76787ee Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Tue, 24 Jan 2017 16:58:51 +0100 Subject: [PATCH 063/256] Fixed placeholder for new post. --- website/views/profile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/views/profile.php b/website/views/profile.php index 2bc0341..0b2f4f2 100644 --- a/website/views/profile.php +++ b/website/views/profile.php @@ -60,7 +60,7 @@
    - +
    -- 2.49.1 From 7144d700e4c3d805b4d85f68b7d20e93e68d966b Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Tue, 24 Jan 2017 17:02:49 +0100 Subject: [PATCH 064/256] Removed debug echo from profile page. --- website/public/profile.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/website/public/profile.php b/website/public/profile.php index 439f74a..4f9d680 100644 --- a/website/public/profile.php +++ b/website/public/profile.php @@ -20,8 +20,6 @@ if(empty($_GET["username"])) { $userID = getUserID($_GET["username"]); } -echo "User ID: $userID"; - $user = selectUser($_SESSION["userID"], $userID); $profile_friends = selectAllFriends($userID); $profile_groups = selectAllUserGroups($userID); -- 2.49.1 From 7bf8a16cf0c306303db1b1ae3179beb71fe3e39c Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Tue, 24 Jan 2017 17:06:39 +0100 Subject: [PATCH 065/256] Dingen door elkaar --- website/public/{ => API}/edit_friendship.php | 5 ++-- website/public/js/notifications.js | 24 ++++++++++++++--- website/public/styles/menu.css | 28 ++++++++++++++++++++ website/queries/private_message.php | 1 + website/views/chat-view.php | 7 ++++- website/views/loadFriends.php | 3 +++ 6 files changed, 61 insertions(+), 7 deletions(-) rename website/public/{ => API}/edit_friendship.php (91%) create mode 100644 website/views/loadFriends.php diff --git a/website/public/edit_friendship.php b/website/public/API/edit_friendship.php similarity index 91% rename from website/public/edit_friendship.php rename to website/public/API/edit_friendship.php index d88e264..0a08066 100644 --- a/website/public/edit_friendship.php +++ b/website/public/API/edit_friendship.php @@ -1,7 +1,8 @@ \ -
    \ +
  • \ + \ \ \ +
    \ +
    \ + \ + \ + \ + \ + \ +
    \
  • \ "); } @@ -22,10 +38,10 @@ function showChatNotifications(notifications) { $("#unreadChatlist").html(""); for (i in notifications) { $("#unreadChatlist").append(" \ -
  • \ +
  • \ \
  • - "; + "; + } + + $chatID = $_GET["chatID"]; + if (isset($chatID) && $chatID != "") { + echo ""; } ?> diff --git a/website/views/loadFriends.php b/website/views/loadFriends.php new file mode 100644 index 0000000..b4cbaca --- /dev/null +++ b/website/views/loadFriends.php @@ -0,0 +1,3 @@ +fetchAll()); \ No newline at end of file -- 2.49.1 From 12ed710369ce6b0e469eee00a856b19eacd3ee8a Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Tue, 24 Jan 2017 17:10:12 +0100 Subject: [PATCH 066/256] Fixed API --- website/public/profile.php | 1 - website/views/profile.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/website/public/profile.php b/website/public/profile.php index 4f9d680..be71023 100644 --- a/website/public/profile.php +++ b/website/public/profile.php @@ -15,7 +15,6 @@ include("../queries/nicetime.php"); if(empty($_GET["username"])) { $userID = $_SESSION["userID"]; - echo "USERNAME NOT GIVEN"; } else { $userID = getUserID($_GET["username"]); } diff --git a/website/views/profile.php b/website/views/profile.php index 0b2f4f2..07ccbee 100644 --- a/website/views/profile.php +++ b/website/views/profile.php @@ -2,7 +2,7 @@
    "> - + Date: Tue, 24 Jan 2017 17:31:39 +0100 Subject: [PATCH 067/256] In notification bar accept or deny --- website/public/API/edit_friendship.php | 2 +- website/public/js/notifications.js | 22 ++++++++++++++-------- website/queries/friendship.php | 15 +++++++++++++++ 3 files changed, 30 insertions(+), 9 deletions(-) diff --git a/website/public/API/edit_friendship.php b/website/public/API/edit_friendship.php index 0a08066..52aacf5 100644 --- a/website/public/API/edit_friendship.php +++ b/website/public/API/edit_friendship.php @@ -28,4 +28,4 @@ if(!empty($_POST["request"]) AND $friendship_status == 0) { $username = getUsername($_POST["userID"]); -header("Location: profile.php?username=$username"); \ No newline at end of file +header("Location: ../profile.php?username=$username"); \ No newline at end of file diff --git a/website/public/js/notifications.js b/website/public/js/notifications.js index aacff71..afcaca0 100644 --- a/website/public/js/notifications.js +++ b/website/public/js/notifications.js @@ -1,9 +1,19 @@ function showFriendNotifications(notifications) { $("#friendrequestslist").html(""); for (i in notifications) { + var outgoing = ""; + if (notifications[i].friend_state == "3") { + outgoing = " \ + \ + "; + } + $("#friendrequestslist").append(" \
  • \ - \ + \ \ - \ \ - \ + \ \
  • \ \ diff --git a/website/queries/friendship.php b/website/queries/friendship.php index d0279c9..cb35640 100644 --- a/website/queries/friendship.php +++ b/website/queries/friendship.php @@ -39,6 +39,21 @@ function selectAllFriendRequests() { SELECT `userID`, `username`, + CASE `status` IS NULL + WHEN TRUE THEN 0 + WHEN FALSE THEN + CASE `status` = 'confirmed' + WHEN TRUE THEN + 1 + WHEN FALSE THEN + CASE `user1ID` = :userID + WHEN TRUE THEN + 2 + WHEN FALSE THEN + 3 + END + END + END AS `friend_state`, LEFT(CONCAT(`user`.`fname`, ' ', `user`.`lname`), 15) as `name`, IFNULL( `profilepicture`, -- 2.49.1 From f7da87596a513cf8ae421e97e2123aa7a771bc88 Mon Sep 17 00:00:00 2001 From: Marijn Jansen Date: Wed, 25 Jan 2017 09:30:05 +0100 Subject: [PATCH 068/256] Added emailconfirm.php --- website/public/emailconfirm.php | 49 +++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 website/public/emailconfirm.php diff --git a/website/public/emailconfirm.php b/website/public/emailconfirm.php new file mode 100644 index 0000000..97eb2f6 --- /dev/null +++ b/website/public/emailconfirm.php @@ -0,0 +1,49 @@ +prepare(" + SELECT + `email`, + `role` + FROM + `user` + WHERE + `userID` = :userID + "); + $checkHash->bindParam(":userID", $_GET["u"]); + $checkHash->execute(); + $result = $checkHash->fetch(); + $email = $result["email"]; + $role = $result["role"]; + if ($role == "unconfirmed") { + doActivate($email); + } else { + echo "Ongeldige link."; + } + +} else { + echo "Ongeldige link."; +} + +function doActivate(string $email) { + if (password_verify($email, $_GET["h"])) { + $confirmUser = $GLOBALS["db"]->prepare(" + UPDATE + `user` + SET + `role` = :role + WHERE + `userID` = :userID + "); + $confirmUser->bindValue(":role", "user"); + $confirmUser->bindParam(":userID", $_GET["u"]); + $confirmUser->execute(); + if ($confirmUser->rowCount()) { + echo "Email bevestigd
    + U wordt automatisch doorgestuurd naar de login pagina over 5 seconden. "; + header("refresh:5;url=login.php"); + } + } else { + echo "Ongeldige link."; + } +} \ No newline at end of file -- 2.49.1 From 28f31d749bf4dc5a920939c55d37a0f9f9a2b2f3 Mon Sep 17 00:00:00 2001 From: Marijn Jansen Date: Wed, 25 Jan 2017 11:16:53 +0100 Subject: [PATCH 069/256] Email confirm (: --- website/queries/emailconfirm.php | 43 ++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 website/queries/emailconfirm.php diff --git a/website/queries/emailconfirm.php b/website/queries/emailconfirm.php new file mode 100644 index 0000000..8b0031c --- /dev/null +++ b/website/queries/emailconfirm.php @@ -0,0 +1,43 @@ +prepare(" + SELECT + `userID` + FROM + `user` + WHERE + `username` = :username + "); + $stmt->bindParam(":username", $username); + $stmt->execute(); + $userID = $stmt->fetch()["username"]; + sendConfirmEmail($userID); +} + +function sendConfirmEmail(int $userID) { + $stmt = $GLOBALS["db"]->prepare(" + SELECT + `email`, + `fname` + FROM + `user` + WHERE + `userID` = :userID + "); + $stmt->bindParam(":userID", $userID); + $user = $stmt->fetch(); + + $email = $user["email"]; + $fname = $user["fname"]; + $hash = password_hash($email, PASSWORD_DEFAULT); + $confirmLink = "https://myhyvesbookplus.nl/emailconfirm.php?u=$userID&h=$hash"; + + $subject = "Bevestig uw emailadres"; + $body = "Hallo $fname,\r\n\r\n + Klik op de onderstaande link om uw emailadres te bevestigen.\r\n\r\n + $confirmLink\r\n\r\n + Groeten MyHyvesbook+"; + $header = "From: MyHyvesbook+ "; + mail($email, $subject, $body, $header); +} \ No newline at end of file -- 2.49.1 From 981e34c95082d1bffe8b4a0ca18f5a19239d5829 Mon Sep 17 00:00:00 2001 From: Joey Lai Date: Wed, 25 Jan 2017 11:19:01 +0100 Subject: [PATCH 070/256] redesigned code --- website/public/js/registerAndLogin.js | 5 +++- website/public/login.php | 23 +++------------ website/public/register.php | 4 +-- website/public/styles/index.css | 2 +- website/queries/checkInput.php | 3 +- website/queries/login.php | 40 ++++++++++++++++++++++++++- website/views/login_head.php | 4 +-- website/views/register-view.php | 2 +- 8 files changed, 55 insertions(+), 28 deletions(-) diff --git a/website/public/js/registerAndLogin.js b/website/public/js/registerAndLogin.js index 0452d15..4e68a07 100644 --- a/website/public/js/registerAndLogin.js +++ b/website/public/js/registerAndLogin.js @@ -4,5 +4,8 @@ function checkLoggedIn() { } else { window.location.href = "profile.php"; } - document.getElementById("demo").innerHTML = x; } + +function bannedAlert(){ + alert("Your account is banned"); +} \ No newline at end of file diff --git a/website/public/login.php b/website/public/login.php index 0d07413..b3a00b0 100644 --- a/website/public/login.php +++ b/website/public/login.php @@ -22,26 +22,11 @@ // Trying to login if ($_SERVER["REQUEST_METHOD"] == "POST") { - // Empty username or password field - if (empty($_POST["uname"]) || empty($_POST["psw"])) { - $loginErr = "Gebruikersnaam of wachtwoord is niet ingevuld"; - - } - else { + try{ $uname = strtolower(test_input($_POST["uname"])); - $psw = test_input($_POST["psw"]); - $hash = getUser()["password"]; - $userid = getUser()["userID"]; - - // If there's an account, go to the profile page - if(password_verify($psw, $hash)) { - $_SESSION["userID"] = $userid; - header("location: profile.php"); - - } else { - $loginErr = "Inloggegevens zijn niet correct"; - } - + validateLogin($_POST["uname"], $_POST["psw"]); + } catch(loginException $e) { + $loginErr = $e->getMessage(); } } diff --git a/website/public/register.php b/website/public/register.php index 99af6c0..84d6873 100644 --- a/website/public/register.php +++ b/website/public/register.php @@ -45,7 +45,7 @@ } try{ - $username = test_input(($_POST["username"])); + $username = str_replace(' ', '', test_input(($_POST["username"]))); checkInputChoice($username, "username"); } catch(usernameException $e){ $correct = false; @@ -53,7 +53,7 @@ } try{ - $password = test_input(($_POST["password"])); + $password = str_replace(' ', '', test_input(($_POST["password"]))); checkInputChoice($password, "longerEight"); matchPassword(); } catch(passwordException $e){ diff --git a/website/public/styles/index.css b/website/public/styles/index.css index 8482cea..fc9d3d6 100644 --- a/website/public/styles/index.css +++ b/website/public/styles/index.css @@ -1,6 +1,6 @@ a.button { background-color: #C8CABD; - border-radius: 10px; + border-radius: 5px; color: black; cursor: pointer; height: 50%; diff --git a/website/queries/checkInput.php b/website/queries/checkInput.php index cc32626..5f72f10 100644 --- a/website/queries/checkInput.php +++ b/website/queries/checkInput.php @@ -38,7 +38,8 @@ function checkName($variable){ if (empty($variable)) { throw new lettersAndSpacesException("Verplicht!"); } else if (!preg_match("/^[a-zA-Z ]*$/", $variable)) { - throw new lettersAndSpacesException("Alleen letters en spaties zijn toegestaan!"); + + throw new lettersAndSpacesException("Alleen letters en spaties zijn toegestaan!"); } } diff --git a/website/queries/login.php b/website/queries/login.php index 180b431..8605e67 100644 --- a/website/queries/login.php +++ b/website/queries/login.php @@ -4,7 +4,8 @@ function getUser() { $stmt = $GLOBALS["db"]->prepare(" SELECT `password`, - `userID` + `userID`, + `role` FROM `user` WHERE @@ -15,3 +16,40 @@ function getUser() { $stmt->execute(); return $stmt->fetch(PDO::FETCH_ASSOC); } + +function validateLogin($username, $password){ + // Empty username or password field + if (empty($username) || empty($password)) { + throw new loginException("Gebruikersnaam of wachtwoord is niet ingevuld"); + } + else { + $psw = test_input($password); + $hash = getUser()["password"]; + $userID = getUser()["userID"]; + $role = getUser()["role"]; + + // If there's an account, go to the profile page + if(password_verify($psw, $hash)) { + if ($role == "banned"){ + echo ""; + } else { + $_SESSION["userID"] = $userID; + header("location: profile.php"); + } + } else { + throw new loginException("Inloggevens zijn niet correct"); + } + + } +} + +class loginException extends Exception +{ + public function __construct($message = "", $code = 0, Exception $previous = null) + { + parent::__construct($message, $code, $previous); + } +} +?> \ No newline at end of file diff --git a/website/views/login_head.php b/website/views/login_head.php index e983fab..e831cd2 100644 --- a/website/views/login_head.php +++ b/website/views/login_head.php @@ -7,7 +7,7 @@ - - + + diff --git a/website/views/register-view.php b/website/views/register-view.php index 4c660c9..f970a6f 100644 --- a/website/views/register-view.php +++ b/website/views/register-view.php @@ -96,7 +96,7 @@ + diff --git a/website/views/login_head.php b/website/views/login_head.php index e831cd2..e319a9d 100644 --- a/website/views/login_head.php +++ b/website/views/login_head.php @@ -7,7 +7,7 @@ - + diff --git a/website/views/register-view.php b/website/views/register-view.php index f970a6f..5f39472 100644 --- a/website/views/register-view.php +++ b/website/views/register-view.php @@ -126,7 +126,7 @@ -- 2.49.1 From 44f86a4fbb614f56b013c964b92662f15f680a5b Mon Sep 17 00:00:00 2001 From: Marijn Jansen Date: Thu, 26 Jan 2017 12:05:28 +0100 Subject: [PATCH 093/256] Email confirm and password change now use messagepage function. --- website/public/emailconfirm.php | 12 ++--- website/public/resetpassword.php | 16 +++--- website/views/messagepage.php | 23 +++++++++ website/views/resetpassword.php | 85 ++++++++++++++------------------ 4 files changed, 77 insertions(+), 59 deletions(-) create mode 100644 website/views/messagepage.php diff --git a/website/public/emailconfirm.php b/website/public/emailconfirm.php index 97eb2f6..2812eaa 100644 --- a/website/public/emailconfirm.php +++ b/website/public/emailconfirm.php @@ -1,5 +1,6 @@ prepare(" SELECT @@ -18,11 +19,11 @@ if (array_key_exists("u", $_GET) and array_key_exists("h", $_GET)) { if ($role == "unconfirmed") { doActivate($email); } else { - echo "Ongeldige link."; + messagePage("Ongeldige link."); } } else { - echo "Ongeldige link."; + messagePage("Ongeldige link."); } function doActivate(string $email) { @@ -39,11 +40,10 @@ function doActivate(string $email) { $confirmUser->bindParam(":userID", $_GET["u"]); $confirmUser->execute(); if ($confirmUser->rowCount()) { - echo "Email bevestigd
    - U wordt automatisch doorgestuurd naar de login pagina over 5 seconden. "; - header("refresh:5;url=login.php"); + messagePage("Email bevestigd
    + Klik hier om terug te gaan naar de login pagina."); } } else { - echo "Ongeldige link."; + messagePage("Ongeldige link."); } } \ No newline at end of file diff --git a/website/public/resetpassword.php b/website/public/resetpassword.php index 54b706b..3ca2698 100644 --- a/website/public/resetpassword.php +++ b/website/public/resetpassword.php @@ -1,26 +1,30 @@ + + + + + +
    + +
    $content
    +
    + + + "); + + echo $webpage; + } \ No newline at end of file diff --git a/website/views/resetpassword.php b/website/views/resetpassword.php index 24d3aaf..a3107f9 100644 --- a/website/views/resetpassword.php +++ b/website/views/resetpassword.php @@ -1,47 +1,38 @@ - - - - - - -
    - - -
    -
    Voer een nieuw wachtwoord in
    - " - > - " - > -
      -
    • - - -
    • -
    • - - -
    • -
    • - - -
    • -
    - -
    - - \ No newline at end of file + +
    Voer een nieuw wachtwoord in
    + + +
      +
    • + + +
    • +
    • + + +
    • +
    • + + +
    • +
    + "; + return $content; +} \ No newline at end of file -- 2.49.1 From 47eed5514a80408a735bafbfbf756166dad27542 Mon Sep 17 00:00:00 2001 From: Marijn Jansen Date: Thu, 26 Jan 2017 12:14:07 +0100 Subject: [PATCH 094/256] Removed .idea folder --- .idea/WebDB.iml | 18 ---------------- .idea/inspectionProfiles/Project_Default.xml | 22 -------------------- .idea/modules.xml | 8 ------- .idea/php.xml | 4 ---- .idea/sqldialects.xml | 6 ------ .idea/vcs.xml | 6 ------ 6 files changed, 64 deletions(-) delete mode 100644 .idea/WebDB.iml delete mode 100644 .idea/inspectionProfiles/Project_Default.xml delete mode 100644 .idea/modules.xml delete mode 100644 .idea/php.xml delete mode 100644 .idea/sqldialects.xml delete mode 100644 .idea/vcs.xml diff --git a/.idea/WebDB.iml b/.idea/WebDB.iml deleted file mode 100644 index b313593..0000000 --- a/.idea/WebDB.iml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index f08a78f..0000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index e1b2ef9..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/.idea/php.xml b/.idea/php.xml deleted file mode 100644 index 10b171f..0000000 --- a/.idea/php.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/sqldialects.xml b/.idea/sqldialects.xml deleted file mode 100644 index af0e43a..0000000 --- a/.idea/sqldialects.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file -- 2.49.1 From 423c2fd7712b0be152c4201e3e2063b9917ac85b Mon Sep 17 00:00:00 2001 From: Marijn Jansen Date: Thu, 26 Jan 2017 12:16:28 +0100 Subject: [PATCH 095/256] Revert "Merge branch 'marijn-settings' into 'master'" This reverts merge request !128 --- .idea/WebDB.iml | 18 ++++++++++++++++ .idea/inspectionProfiles/Project_Default.xml | 22 ++++++++++++++++++++ .idea/modules.xml | 8 +++++++ .idea/php.xml | 4 ++++ .idea/sqldialects.xml | 6 ++++++ .idea/vcs.xml | 6 ++++++ 6 files changed, 64 insertions(+) create mode 100644 .idea/WebDB.iml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/php.xml create mode 100644 .idea/sqldialects.xml create mode 100644 .idea/vcs.xml diff --git a/.idea/WebDB.iml b/.idea/WebDB.iml new file mode 100644 index 0000000..b313593 --- /dev/null +++ b/.idea/WebDB.iml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..f08a78f --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,22 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..e1b2ef9 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/php.xml b/.idea/php.xml new file mode 100644 index 0000000..10b171f --- /dev/null +++ b/.idea/php.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/sqldialects.xml b/.idea/sqldialects.xml new file mode 100644 index 0000000..af0e43a --- /dev/null +++ b/.idea/sqldialects.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file -- 2.49.1 From 3ebacd62515c89cf6633c7ad0d41631211d09434 Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Thu, 26 Jan 2017 12:20:32 +0100 Subject: [PATCH 096/256] Fixed masonry grid (posts). --- website/public/js/masonry.js | 66 ++++++++++++++---------------------- website/public/profile.php | 16 ++++++++- website/queries/user.php | 4 ++- website/views/profile.php | 50 +++++++++++++-------------- 4 files changed, 69 insertions(+), 67 deletions(-) diff --git a/website/public/js/masonry.js b/website/public/js/masonry.js index e9419a2..b523828 100644 --- a/website/public/js/masonry.js +++ b/website/public/js/masonry.js @@ -1,37 +1,28 @@ margin = 20; -$(window).on("load", function() { - console.log("LOADED"); - container = $("div.posts"); - posts = container.children(); - posts.remove(); - - column = $('
    ').append(posts); - container.append(column); - - mansonry(); - mansonry(); -}); - $(window).resize(function() { clearTimeout(window.resizedFinished); window.resizeFinished = setTimeout(function() { - mansonry(); + masonry(); }, 250); }); -function mansonry() { +var $container = $(".posts"); +function masonry() { + $container.children().remove(); columnCount = Math.floor($(".posts").width() / 250); - console.log("columns: " + columnCount); /* * Initialise columns. */ var columns = new Array(columnCount); + var $columns = new Array(columnCount); for (i = 0; i < columnCount; i++) { - columns[i] = [0, []]; - console.log(columns[i]); + $column = $("
    "); + $column.width(100/columnCount + "%"); + $container.append($column); + columns[i] = [0, $column]; } /* @@ -45,32 +36,27 @@ function mansonry() { column = columns[i]; } } - return column; } /* - * Rearange the objects. + * Get the posts from the server. */ - j = 0; - posts.each(function(i) { - post = posts[i]; - shortestColumn = getShortestColumn(columns); - shortestColumn[0] = shortestColumn[0] + $(post).height() + margin; - shortestColumn[1].push(post); + $.post("API/getPosts.php", { usr : userID }) + .done(function(data) { + posts = JSON.parse(data); - }); - - container.children().remove(); - /* - * Display the objects again in the correct order. - */ - for (i = 0; i < columnCount; i++) { - column = $('
    ').append(columns[i][1]); - console.log(column); - container.append(column); + /* + * Rearange the objects. + */ + jQuery.each(posts, function() { + $post = $("
    "); + $post.append($("

    ").text(this["title"])); + $post.append($("

    ").html(this["content"])); - } - - $("div.posts div.column").width(100/columnCount + "%"); -} \ No newline at end of file + shortestColumn = getShortestColumn(columns); + shortestColumn[1].append($post); + shortestColumn[0] = shortestColumn[0] + $post.height() + margin; + }); + }); +} diff --git a/website/public/profile.php b/website/public/profile.php index 6e188c4..1423483 100644 --- a/website/public/profile.php +++ b/website/public/profile.php @@ -2,7 +2,6 @@ - @@ -45,10 +44,25 @@ include("../views/footer.php"); ?> + diff --git a/website/queries/user.php b/website/queries/user.php index 9904eee..7672746 100644 --- a/website/queries/user.php +++ b/website/queries/user.php @@ -126,7 +126,9 @@ function selectAllUserPosts($userID) { "); $stmt->bindParam(':userID', $userID, PDO::PARAM_INT); - $stmt->execute(); + if(!$stmt->execute()) { + return False; + } return $stmt; } diff --git a/website/views/profile.php b/website/views/profile.php index 3719ff1..6b7b283 100644 --- a/website/views/profile.php +++ b/website/views/profile.php @@ -5,7 +5,7 @@

    - +

    @@ -43,29 +43,29 @@
    - -
    -
    - - - - -
    - fetch()) { - $nicetime = nicetime($post["creationdate"]); - echo " -
    -

    ${post["title"]}

    -

    ${post["content"]}

    -

    ${nicetime} geplaatst.

    -
    - "; - } - ?> + + + + + + + + +fetch()) { +// $nicetime = nicetime($post["creationdate"]); +// echo " +//
    +//

    ${post["title"]}

    +//

    ${post["content"]}

    +//

    ${nicetime} geplaatst.

    +//
    +// "; +// } +// ?>
    \ No newline at end of file -- 2.49.1 From 91aca6baa740f48958435a3f12ee608cbd8d4e14 Mon Sep 17 00:00:00 2001 From: Hendrik Date: Thu, 26 Jan 2017 12:21:01 +0100 Subject: [PATCH 097/256] change comments to use ajax --- website/public/API/postComment.php | 14 ++++++++------ website/public/js/post.js | 18 ++++++++++++++++++ website/public/js/profile.js | 8 -------- website/public/profile.php | 2 +- website/views/post-view.php | 6 +++--- 5 files changed, 30 insertions(+), 18 deletions(-) create mode 100644 website/public/js/post.js diff --git a/website/public/API/postComment.php b/website/public/API/postComment.php index c5b30cc..b840e0b 100644 --- a/website/public/API/postComment.php +++ b/website/public/API/postComment.php @@ -5,12 +5,14 @@ session_start(); require("../../queries/post.php"); require("../../queries/connect.php"); require("../../queries/checkInput.php"); - if (empty($_POST['newcomment-content'])) { + echo 0; } else { - makeComment($_POST['postID'], + if(makeComment($_POST['postID'], $_SESSION['userID'], - test_input($_POST['newcomment-content'])); -} - -header("Location: ../profile.php"); \ No newline at end of file + test_input($_POST['newcomment-content']))) { + echo 1; + } else { + echo 0; + } +} \ No newline at end of file diff --git a/website/public/js/post.js b/website/public/js/post.js new file mode 100644 index 0000000..62ace68 --- /dev/null +++ b/website/public/js/post.js @@ -0,0 +1,18 @@ +function postComment() { + $.post( + "API/postComment.php", + $("#newcommentform").serialize() + ); + + $("#newcomment").val(""); + + //reload post + $.get( + "API/loadPost.php", + $("#newcommentform").serialize() + ).done(function (data) { + $('#modal-response').html(data); + }); +} + + diff --git a/website/public/js/profile.js b/website/public/js/profile.js index 2a47dce..e69de29 100644 --- a/website/public/js/profile.js +++ b/website/public/js/profile.js @@ -1,8 +0,0 @@ -function loadPost(postID) { - $.get( - "API/loadPost.php", - $(postID).serialize() - ).done(function (data) { - $('#modal-response').innerHTML= JSON.parse(data); - }); -} \ No newline at end of file diff --git a/website/public/profile.php b/website/public/profile.php index d2d3c3f..c8f27c4 100644 --- a/website/public/profile.php +++ b/website/public/profile.php @@ -3,7 +3,7 @@ - + + + fetchColumn(); Zoek: > - @@ -79,22 +83,9 @@ $group_count = countSomeGroups($search)->fetchColumn(); @@ -122,42 +113,9 @@ $group_count = countSomeGroups($search)->fetchColumn(); -- 2.49.1 From b66c108f4ec105ed990c804581197b03beb2ac52 Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Thu, 26 Jan 2017 14:31:45 +0100 Subject: [PATCH 101/256] Fixed post titles for htmlchars. --- website/public/js/masonry.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/public/js/masonry.js b/website/public/js/masonry.js index 0b31443..6b91e4b 100644 --- a/website/public/js/masonry.js +++ b/website/public/js/masonry.js @@ -100,7 +100,7 @@ function masonry(mode) { */ jQuery.each(posts, function() { $post = $("
    "); - $post.append($("

    ").text(this["title"])); + $post.append($("

    ").html(this["title"])); $post.append($("

    ").html(this["content"])); $post.append($("

    ").text(this["nicetime"])); -- 2.49.1 From 96f70e1a113ee487e65af9e0ab3adebf3d5a29e7 Mon Sep 17 00:00:00 2001 From: Joey Lai Date: Thu, 26 Jan 2017 14:50:41 +0100 Subject: [PATCH 102/256] Fixed date and other extras --- website/public/login.php | 6 +-- website/public/register.php | 17 ++++++-- website/public/styles/index.css | 7 ++- website/queries/checkInput.php | 23 +++++++--- website/queries/login.php | 6 +-- website/queries/register.php | 26 ++++++----- website/views/login-view.php | 77 +++++++++++++++++---------------- website/views/register-view.php | 66 ++++++++++++++++++++++++---- 8 files changed, 156 insertions(+), 72 deletions(-) diff --git a/website/public/login.php b/website/public/login.php index 0515793..d4dd991 100644 --- a/website/public/login.php +++ b/website/public/login.php @@ -20,15 +20,15 @@ } // Define variables and set to empty values - $uname = $psw =""; + $user = $psw =""; $loginErr = $resetErr =""; if ($_SERVER["REQUEST_METHOD"] == "POST") { switch ($_POST["submit"]) { case "login": try { - $uname = ($_POST["uname"]); - validateLogin($_POST["uname"], $_POST["psw"]); + $user = ($_POST["user"]); + validateLogin($_POST["user"], $_POST["psw"]); } catch(loginException $e) { $loginErr = $e->getMessage(); } diff --git a/website/public/register.php b/website/public/register.php index 1ce4817..0077e62 100644 --- a/website/public/register.php +++ b/website/public/register.php @@ -14,9 +14,12 @@ header("location: login.php"); } // define variables and set to empty values - $name = $surname = $bday = $username = $password = $confirmpassword = $location = $housenumber = $email = $captcha = $ip = ""; - $genericErr = $nameErr = $surnameErr = $bdayErr = $usernameErr = $passwordErr = $confirmpasswordErr = $locationErr = $housenumberErr = $emailErr = $captchaErr = ""; + $name = $surname = $bday = $username = $password = $confirmpassword = $location = $housenumber = $email = $confirmEmail = $captcha = $ip = ""; + $genericErr = $nameErr = $surnameErr = $bdayErr = $usernameErr = $passwordErr = $confirmpasswordErr = $locationErr = $housenumberErr = $emailErr = $confirmEmailErr = $captchaErr = ""; $correct = true; + $day_date = "dag"; + $month_date = "maand"; + $year_date = "jaar"; // Trying to register an account if ($_SERVER["REQUEST_METHOD"] == "POST") { @@ -38,7 +41,10 @@ } try{ - $bday = test_input(($_POST["bday"])); + $day_date = test_input(($_POST["day_date"])); + $month_date = test_input(($_POST["month_date"])); + $year_date = test_input(($_POST["year_date"])); + $bday = $year_date . "-" . $month_date . "-" . $day_date; checkInputChoice($bday, "bday"); } catch(bdayException $e){ $correct = false; @@ -76,9 +82,14 @@ try{ $email = test_input(($_POST["email"])); checkInputChoice($email, "email"); + $confirmEmail = test_input(($_POST["confirmEmail"])); + matchEmail(); } catch(emailException $e){ $correct = false; $emailErr = $e->getMessage(); + } catch(confirmEmailException $e){ + $correct = false; + $confirmEmailErr = $e->getMessage(); } try{ diff --git a/website/public/styles/index.css b/website/public/styles/index.css index 97d6f63..9829688 100644 --- a/website/public/styles/index.css +++ b/website/public/styles/index.css @@ -133,6 +133,10 @@ label { width: 45%; } +select{ + width: 18%; +} + ul { font-family: Arial; font-size: 16px; @@ -203,7 +207,6 @@ ul { .modal-body {padding: 2px 16px;} .modal-footer { - padding: 2px 16px; background-color: #FBC02D; color: black; -} \ No newline at end of file +} diff --git a/website/queries/checkInput.php b/website/queries/checkInput.php index 9b91833..fbf64a7 100644 --- a/website/queries/checkInput.php +++ b/website/queries/checkInput.php @@ -38,8 +38,7 @@ function checkName($variable){ if (empty($variable)) { throw new lettersAndSpacesException("Verplicht!"); } else if (!preg_match("/^[a-zA-Z ]*$/", $variable)) { - - throw new lettersAndSpacesException("Alleen letters en spaties zijn toegestaan!"); + throw new lettersAndSpacesException("Alleen letters en spaties zijn toegestaan!"); } } @@ -48,12 +47,12 @@ function validateBday($variable){ if (empty($variable)) { throw new bdayException("Verplicht!"); } else { - if (!(validateDate($variable, "Y/m/d"))) { + if (!(validateDate($variable, "Y-m-d"))) { throw new bdayException("Geen geldige datum"); } else { - $dateNow = date("Y/m/d"); + $dateNow = date("Y-m-d"); if ($dateNow < $variable) { - throw new bdayException("Geen geldige datum"); + throw new bdayException("Geen geldige datum!"); } } } @@ -97,6 +96,12 @@ function validateEmail($variable){ } } +function matchEmail(){ + if (strtolower($_POST["email"]) != strtolower($_POST["confirmEmail"])){ + throw new confirmEmailException("Emails matchen niet!"); + } +} + /* checks if an input is a valid email. */ function resetEmail($variable){ if (empty($variable)) { @@ -206,6 +211,14 @@ class emailException extends Exception } } +class confirmEmailException extends Exception +{ + public function __construct($message = "", $code = 0, Exception $previous = null) + { + parent::__construct($message, $code, $previous); + } +} + class captchaException extends Exception { public function __construct($message = "", $code = 0, Exception $previous = null) diff --git a/website/queries/login.php b/website/queries/login.php index 2af255a..15a5de1 100644 --- a/website/queries/login.php +++ b/website/queries/login.php @@ -9,10 +9,10 @@ function getUser() { FROM `user` WHERE - `username` LIKE :username + `username` LIKE :username OR + `email` LIKE :username "); - $stmt->bindParam(":username", $_POST["uname"]); $stmt->execute(); return $stmt->fetch(PDO::FETCH_ASSOC); } @@ -20,7 +20,7 @@ function getUser() { function validateLogin($username, $password){ // Empty username or password field if (empty($username) || empty($password)) { - throw new loginException("Gebruikersnaam of wachtwoord is niet ingevuld"); + throw new loginException("Inloggegevens zijn niet ingevuld"); } else { $psw = test_input($password); diff --git a/website/queries/register.php b/website/queries/register.php index 738ef43..be9d415 100644 --- a/website/queries/register.php +++ b/website/queries/register.php @@ -10,7 +10,7 @@ function getExistingUsername() { `username` LIKE :username "); - $stmt->bindParam(":username", $_POST["username"]); + $stmt->bindParam(":username", test_input($_POST["username"])); $stmt->execute(); return $stmt->rowCount(); @@ -26,7 +26,7 @@ function getExistingEmail() { `email` LIKE :email "); - $stmt->bindParam(":email", $_POST["email"]); + $stmt->bindParam(":email", test_input($_POST["email"])); $stmt->execute(); return $stmt->rowCount(); @@ -42,7 +42,7 @@ function getResetEmail() { `email` LIKE :email "); - $stmt->bindParam(":email", $_POST["forgotEmail"]); + $stmt->bindParam(":email", test_input($_POST["forgotEmail"])); $stmt->execute(); return $stmt->rowCount(); @@ -70,15 +70,21 @@ function registerAccount() { $hash=password_hash($_POST["password"], PASSWORD_DEFAULT); - $stmt->bindParam(":fname", $_POST["name"]); - $stmt->bindParam(":lname", $_POST["surname"]); - $stmt->bindParam(":bday", $_POST["bday"]); - $stmt->bindParam(":username", $_POST["username"]); - $stmt->bindParam(":password", $hash); - $stmt->bindParam(":location", $_POST["location"]); - $stmt->bindParam(":email", (strtolower($_POST["email"]))); + $stmt->bindParam(":fname", test_input($_POST["name"])); + $stmt->bindParam(":lname", test_input($_POST["surname"])); + $stmt->bindParam(":bday", test_input($_POST["bday"])); + $stmt->bindParam(":username", test_input($_POST["username"])); + $stmt->bindParam(":password", test_input($hash)); + $stmt->bindParam(":location", test_input($_POST["location"])); + $stmt->bindParam(":email", test_input(strtolower($_POST["email"]))); $stmt->execute(); $stmt->rowCount(); } + +function submitselect($date, $value){ + if ($date == $value){ + echo "selected"; + } +} ?> diff --git a/website/views/login-view.php b/website/views/login-view.php index de4c48b..c64590e 100644 --- a/website/views/login-view.php +++ b/website/views/login-view.php @@ -13,11 +13,11 @@

    @@ -47,46 +47,47 @@

    - - -- 2.49.1 From 7073995534742cc2d479f182774d13e2e439b7cf Mon Sep 17 00:00:00 2001 From: Marijn Jansen Date: Thu, 26 Jan 2017 17:03:11 +0100 Subject: [PATCH 108/256] Stop before Genius Bar visit --- website/public/API/postComment.php | 22 ++++++++--- website/public/styles/post-popup.css | 5 +++ website/queries/post.php | 55 +++++++++++++++++++++++++++- website/views/post-view.php | 4 +- 4 files changed, 77 insertions(+), 9 deletions(-) diff --git a/website/public/API/postComment.php b/website/public/API/postComment.php index b840e0b..bbe39b1 100644 --- a/website/public/API/postComment.php +++ b/website/public/API/postComment.php @@ -5,14 +5,24 @@ session_start(); require("../../queries/post.php"); require("../../queries/connect.php"); require("../../queries/checkInput.php"); -if (empty($_POST['newcomment-content'])) { - echo 0; -} else { - if(makeComment($_POST['postID'], - $_SESSION['userID'], - test_input($_POST['newcomment-content']))) { +if ($_POST["button"] == "reaction") { + if (empty($_POST['newcomment-content'])) { + echo 0; + } else { + if (makeComment($_POST['postID'], + $_SESSION['userID'], + test_input($_POST['newcomment-content']))) { + echo 1; + } else { + echo 0; + } + } +} elseif ($_POST["button"] == "nietslecht") { + if (makeNietSlecht($_POST["postID"], $_SESSION["userID"])) { echo 1; } else { echo 0; } +} else { + echo 0; } \ No newline at end of file diff --git a/website/public/styles/post-popup.css b/website/public/styles/post-popup.css index 11fe03b..5522743 100644 --- a/website/public/styles/post-popup.css +++ b/website/public/styles/post-popup.css @@ -69,4 +69,9 @@ .commentcontent { margin: 5px auto; width: 95%; +} + +.nietslecht { + font-family: Impact, sans-serif; + text-shadow: -1.5px 0 1px black, 0 1.5px 1px black, 1px 0 1.5px black, 0 -1.5px 1px black; } \ No newline at end of file diff --git a/website/queries/post.php b/website/queries/post.php index 5940267..59e7a91 100644 --- a/website/queries/post.php +++ b/website/queries/post.php @@ -75,7 +75,7 @@ function makePost($userID, $groupID, $title, $content) { $stmt->execute(); } -function makeComment($postID, $userID, $content) { +function makeComment($postID, $userID, $content) : int { $stmt = $GLOBALS["db"]->prepare(" INSERT INTO `comment` ( @@ -94,4 +94,55 @@ function makeComment($postID, $userID, $content) { $stmt->bindParam(':userID', $userID); $stmt->bindParam(':content', $content); $stmt->execute(); -} \ No newline at end of file + return $stmt->rowCount(); +} + +function makeNietSlecht(int $postID, int $userID) : int { + if (checkNietSlecht($postID, $userID)) { + return deleteNietSlecht(postID, $userID); + } else { + return addNietSlecht($postID, $userID); + } +} + +function checkNietSlecht(int $postID, int $userID) { + $stmt = $GLOBALS["db"]->prepare(" + SELECT + * + FROM + `niet_slecht` + WHERE + `userID` = :userID AND + `postID` = :postID + "); + $stmt->bindParam(":userID", $userID); + $stmt->bindParam(":postID", $postID); + $stmt->execute(); + return $stmt->rowCount(); +} + +function addNietSlecht(int $postID, int $userID) { + $stmt = $GLOBALS["db"]->prepare(" + INSERT INTO + `niet_slecht` (`userID`, `postID`) + VALUES (:userID, :postID) + "); + $stmt->bindParam(":userID", $userID); + $stmt->bindParam(":postID", $postID); + $stmt->execute(); + return $stmt->rowCount(); +} + +function deleteNietSlecht(int $postID, int $userID) { + $stmt = $GLOBALS["db"]->prepare(" + DELETE FROM + `niet_slecht` + WHERE + `userID` = :userID AND + `postID` = :postID + "); + $stmt->bindParam(":userID", $userID); + $stmt->bindParam(":postID", $postID); + $stmt->execute(); + return $stmt->rowCount(); +} diff --git a/website/views/post-view.php b/website/views/post-view.php index 61e0e05..37e64b5 100644 --- a/website/views/post-view.php +++ b/website/views/post-view.php @@ -24,7 +24,9 @@ echo("

    - + + + -- 2.49.1 From 032e25b044c11d0018dfb506de4a9d3d21496f05 Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Thu, 26 Jan 2017 21:50:47 +0100 Subject: [PATCH 109/256] You can now only chat with friends --- website/public/API/sendMessage.php | 1 + website/queries/private_message.php | 2 +- website/views/chat-view.php | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/website/public/API/sendMessage.php b/website/public/API/sendMessage.php index c5d47d1..f84cb11 100644 --- a/website/public/API/sendMessage.php +++ b/website/public/API/sendMessage.php @@ -3,6 +3,7 @@ session_start(); require_once("../../queries/connect.php"); require_once("../../queries/private_message.php"); +require_once("../../queries/friendship.php"); require_once("../../queries/checkInput.php"); if (!empty(test_input($_POST["destination"])) && diff --git a/website/queries/private_message.php b/website/queries/private_message.php index d2b1537..369ee40 100644 --- a/website/queries/private_message.php +++ b/website/queries/private_message.php @@ -58,7 +58,7 @@ function sendMessage($destination, $content) { } function getNewChatMessages($lastID, $destination) { - if (getFriendshipStatus($user2ID) == 1) { + if (getFriendshipStatus($destination) == 1) { $stmt = $GLOBALS["db"]->prepare(" SELECT * diff --git a/website/views/chat-view.php b/website/views/chat-view.php index 0d90149..974b441 100644 --- a/website/views/chat-view.php +++ b/website/views/chat-view.php @@ -74,6 +74,7 @@ name="content" id="newContent" placeholder="Schrijf een bericht..." + autocomplete="off" autofocus required /> -- 2.49.1 From d89e672990325f96c060f3cbb74854eed4519289 Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Thu, 26 Jan 2017 21:54:47 +0100 Subject: [PATCH 110/256] Also fixed unread chat --- website/public/API/sendMessage.php | 1 - website/queries/private_message.php | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/website/public/API/sendMessage.php b/website/public/API/sendMessage.php index f84cb11..c5d47d1 100644 --- a/website/public/API/sendMessage.php +++ b/website/public/API/sendMessage.php @@ -3,7 +3,6 @@ session_start(); require_once("../../queries/connect.php"); require_once("../../queries/private_message.php"); -require_once("../../queries/friendship.php"); require_once("../../queries/checkInput.php"); if (!empty(test_input($_POST["destination"])) && diff --git a/website/queries/private_message.php b/website/queries/private_message.php index 369ee40..4d48d3a 100644 --- a/website/queries/private_message.php +++ b/website/queries/private_message.php @@ -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,6 +59,7 @@ function sendMessage($destination, $content) { } function getNewChatMessages($lastID, $destination) { + 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`, -- 2.49.1 From f1bfc89e6afafc61456c4652fade6f197ebd6a26 Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Thu, 26 Jan 2017 22:33:32 +0100 Subject: [PATCH 111/256] Custom scrollbar --- website/public/styles/main.css | 13 +++++++++++++ website/public/styles/profile.css | 1 + 2 files changed, 14 insertions(+) diff --git a/website/public/styles/main.css b/website/public/styles/main.css index abda8be..0c37afa 100644 --- a/website/public/styles/main.css +++ b/website/public/styles/main.css @@ -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; +} \ No newline at end of file diff --git a/website/public/styles/profile.css b/website/public/styles/profile.css index 85b2db5..becbeca 100644 --- a/website/public/styles/profile.css +++ b/website/public/styles/profile.css @@ -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 { -- 2.49.1 From cbff973b631126093c0b8dad90dcb3513eca38ba Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Fri, 27 Jan 2017 11:15:33 +0100 Subject: [PATCH 112/256] Save manu state with cookie --- website/public/js/header.js | 11 ++++++++++- website/public/js/main.js | 11 +++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/website/public/js/header.js b/website/public/js/header.js index 9889bdb..bdf5fe3 100644 --- a/website/public/js/header.js +++ b/website/public/js/header.js @@ -1,5 +1,4 @@ $(document).ready(function() { - // Toggle menu $("#own-profile-picture, #open-notifications").click(function() { if ($("#notification-center").css('right') == "-256px") { @@ -8,12 +7,22 @@ $(document).ready(function() { $(".modal").width("calc(100% - 512px)"); $(".content").css("margin-right", "256px"); $("#notification-center").css("right", "0px"); + + // Add cookie so the menu stays open on other pages + document.cookie = "menu=open; path=/"; } else { // Make the menu invisible and move the content to the right. $("#chat-history").width("calc(100% - 331px)"); $(".modal").width("calc(100% - 256px)"); $(".content").css("margin-right", "0px"); $("#notification-center").css("right", "-256px"); + + // Change menu cookie to close + document.cookie = "menu=closed; path=/"; } }); + + if (getCookie("menu") == "open") { + $("#own-profile-picture").click(); + } }); diff --git a/website/public/js/main.js b/website/public/js/main.js index 8a52797..5622827 100644 --- a/website/public/js/main.js +++ b/website/public/js/main.js @@ -1,3 +1,14 @@ +function getCookie(key) { + cookies = document.cookie.split("; "); + for (var i in cookies) { + cookie = cookies[i].split("="); + if (cookie[0] == key) { + return cookie[1]; + } + } + return false; +} + function editFriendship(userID, value) { $.post("API/editFriendship.php", { usr: userID, action: value }) .done(function() { -- 2.49.1 From 3b542e08789c15641248b1e315755e6134f4e38b Mon Sep 17 00:00:00 2001 From: Marijn Jansen Date: Fri, 27 Jan 2017 12:20:50 +0100 Subject: [PATCH 113/256] "Niet slecht."-button! --- website/public/API/postComment.php | 5 +++-- website/public/js/post.js | 10 +++++----- website/public/profile.php | 1 + website/public/styles/post-popup.css | 2 +- website/queries/post.php | 2 +- website/views/post-view.php | 15 ++++++++++++--- 6 files changed, 23 insertions(+), 12 deletions(-) diff --git a/website/public/API/postComment.php b/website/public/API/postComment.php index bbe39b1..30c02eb 100644 --- a/website/public/API/postComment.php +++ b/website/public/API/postComment.php @@ -5,7 +5,8 @@ session_start(); require("../../queries/post.php"); require("../../queries/connect.php"); require("../../queries/checkInput.php"); -if ($_POST["button"] == "reaction") { +print_r($_POST); +if ($_POST['button'] == 'reaction') { if (empty($_POST['newcomment-content'])) { echo 0; } else { @@ -17,7 +18,7 @@ if ($_POST["button"] == "reaction") { echo 0; } } -} elseif ($_POST["button"] == "nietslecht") { +} else if ($_POST['button'] == 'nietslecht') { if (makeNietSlecht($_POST["postID"], $_SESSION["userID"])) { echo 1; } else { diff --git a/website/public/js/post.js b/website/public/js/post.js index 62ace68..1906428 100644 --- a/website/public/js/post.js +++ b/website/public/js/post.js @@ -1,7 +1,9 @@ -function postComment() { +function postComment(buttonValue) { + formData = $("#newcommentform").serializeArray(); + formData.push({name: "button", value: buttonValue}); $.post( "API/postComment.php", - $("#newcommentform").serialize() + formData ); $("#newcomment").val(""); @@ -13,6 +15,4 @@ function postComment() { ).done(function (data) { $('#modal-response').html(data); }); -} - - +} \ No newline at end of file diff --git a/website/public/profile.php b/website/public/profile.php index a79ad4c..95c5b86 100644 --- a/website/public/profile.php +++ b/website/public/profile.php @@ -8,6 +8,7 @@ diff --git a/website/public/styles/post-popup.css b/website/public/styles/post-popup.css index 5522743..c6e96c1 100644 --- a/website/public/styles/post-popup.css +++ b/website/public/styles/post-popup.css @@ -72,6 +72,6 @@ } .nietslecht { - font-family: Impact, sans-serif; + font-family: Impact, Anton, sans-serif; text-shadow: -1.5px 0 1px black, 0 1.5px 1px black, 1px 0 1.5px black, 0 -1.5px 1px black; } \ No newline at end of file diff --git a/website/queries/post.php b/website/queries/post.php index 59e7a91..df1e227 100644 --- a/website/queries/post.php +++ b/website/queries/post.php @@ -99,7 +99,7 @@ function makeComment($postID, $userID, $content) : int { function makeNietSlecht(int $postID, int $userID) : int { if (checkNietSlecht($postID, $userID)) { - return deleteNietSlecht(postID, $userID); + return deleteNietSlecht($postID, $userID); } else { return addNietSlecht($postID, $userID); } diff --git a/website/views/post-view.php b/website/views/post-view.php index 37e64b5..4e0ddb1 100644 --- a/website/views/post-view.php +++ b/website/views/post-view.php @@ -2,6 +2,7 @@ $postID = $_GET['postID']; $post = selectPostById($postID)->fetch(PDO::FETCH_ASSOC); $fullname = $post['fname'] . " " . $post['lname'] . " (" . $post['username'] . ")"; +session_start(); echo("
    @@ -21,12 +22,20 @@ echo("
    -
    +
    - + - +
    -- 2.49.1 From f27b9ec6b41f85f519c50961e53eb516e3ec842a Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Fri, 27 Jan 2017 12:22:26 +0100 Subject: [PATCH 114/256] Chat messages split per day --- website/public/js/chat.js | 18 ++++++++++++++++-- website/public/js/main.js | 3 +++ website/public/js/search.js | 2 -- website/public/styles/chat.css | 21 +++++++++++++++++++++ 4 files changed, 40 insertions(+), 4 deletions(-) diff --git a/website/public/js/chat.js b/website/public/js/chat.js index 06f85df..2b2fe34 100644 --- a/website/public/js/chat.js +++ b/website/public/js/chat.js @@ -1,3 +1,5 @@ +var previousDate = new Date("1970-01-01 00:00:00"); + $(document).ready(function() { loadMessages(); sayEmpty(); @@ -31,13 +33,25 @@ function sendMessage() { } function addMessages(messages) { - for(i in messages) { + for(var i in messages) { + thisDate = new Date(messages[i].creationdate); + thisDate.setHours(0,0,0,0); if (messages[i].destination == $(".destinationID").val()) { type = "chat-message-self"; } else { type = "chat-message-other"; } - + if (thisDate > previousDate) { + console.log(previousDate); + previousDate = thisDate; + $("#chat-history").append('\ +
    \ +
    \ + ' + days[thisDate.getDay()] + " " + thisDate.getDate() + " " + months[thisDate.getMonth()] + " " + thisDate.getFullYear() + '\ +
    \ +
    \ + '); + } $("#chat-history").append('\
    \
    \ diff --git a/website/public/js/main.js b/website/public/js/main.js index 5622827..587f020 100644 --- a/website/public/js/main.js +++ b/website/public/js/main.js @@ -1,3 +1,6 @@ +var days = ["zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"]; +var months = ["januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"] + function getCookie(key) { cookies = document.cookie.split("; "); for (var i in cookies) { diff --git a/website/public/js/search.js b/website/public/js/search.js index b3c322a..c026b64 100644 --- a/website/public/js/search.js +++ b/website/public/js/search.js @@ -8,7 +8,6 @@ function searchUsers(n, m) { filter: $("#search-filter").val() } ).done(function(data) { - console.log(data); if (!showFriends(data, "#search-users-list", 0, "profile.php", "GET")) { $("#search-users-list").text("Niemand gevonden"); } @@ -25,7 +24,6 @@ function searchGroups(n, m) { filter: $("#search-filter").val() } ).done(function(data) { - console.log(data); if (!showGroups(data, "#search-groups-list")) { $("#search-groups-list").text("Geen groepen gevonden"); } diff --git a/website/public/styles/chat.css b/website/public/styles/chat.css index 6822d21..600bb41 100644 --- a/website/public/styles/chat.css +++ b/website/public/styles/chat.css @@ -1,3 +1,8 @@ + +body { + overflow: hidden; +} + /* Overall chat-screen */ .chat { position: fixed; @@ -37,6 +42,22 @@ } /* Chat-message takes the whole width of the chat area */ +.day-message { + width: 100%; + min-height: 40px; + padding: 10px 0; + clear: both; + text-align: center; +} + +.day-message-content { + width: auto; + padding: 10px; + + background-color: #F8F8F8; + color: #666; +} + .chat-message { width: 100%; min-height: 40px; -- 2.49.1 From 609f350cd344812617a94a18847aa2590fd94044 Mon Sep 17 00:00:00 2001 From: Joey Lai Date: Fri, 27 Jan 2017 12:27:40 +0100 Subject: [PATCH 115/256] Made different files for login and register --- website/public/login.php | 102 +-------- website/public/register(stash).php | 115 +++++++++++ website/public/register.php | 187 ++++++++--------- website/public/styles/index.css | 31 +-- website/queries/login.php | 5 +- website/views/bdayInput.php | 37 ++++ website/views/forgotPasswordModal.php | 35 ++++ website/views/login-view.php | 286 ++++---------------------- website/views/register-view.php | 8 - website/views/registerModal.php | 155 ++++++++++++++ 10 files changed, 482 insertions(+), 479 deletions(-) create mode 100644 website/public/register(stash).php create mode 100644 website/views/bdayInput.php create mode 100644 website/views/forgotPasswordModal.php create mode 100644 website/views/registerModal.php diff --git a/website/public/login.php b/website/public/login.php index 81fee57..9fd7fb0 100644 --- a/website/public/login.php +++ b/website/public/login.php @@ -28,7 +28,7 @@ $year_date = "jaar"; // Define variables and set to empty values - $user = $psw =""; + $user = $psw = $remember =""; $loginErr = $resetErr =""; if ($_SERVER["REQUEST_METHOD"] == "POST") { @@ -55,107 +55,9 @@ } break; case "register": - try { - $name = test_input(($_POST["name"])); - checkInputChoice($name, "lettersAndSpaces"); - } catch(lettersAndSpacesException $e){ - $correct = false; - $nameErr = $e->getMessage(); - } - - try { - $surname = test_input(($_POST["surname"])); - checkInputChoice($surname, "lettersAndSpaces"); - } - catch(lettersAndSpacesException $e){ - $correct = false; - $surnameErr = $e->getMessage(); - } - - try{ - $day_date = test_input(($_POST["day_date"])); - $month_date = test_input(($_POST["month_date"])); - $year_date = test_input(($_POST["year_date"])); - $bday = $year_date . "-" . $month_date . "-" . $day_date; - checkInputChoice($bday, "bday"); - } catch(bdayException $e){ - $correct = false; - $bdayErr = $e->getMessage(); - } - - try{ - $username = str_replace(' ', '', test_input(($_POST["username"]))); - checkInputChoice($username, "username"); - } catch(usernameException $e){ - $correct = false; - $usernameErr = $e->getMessage(); - } - - try{ - $password = str_replace(' ', '', test_input(($_POST["password"]))); - checkInputChoice($password, "longerEight"); - matchPassword(); - } catch(passwordException $e){ - $correct = false; - $passwordErr = $e->getMessage(); - } catch(confirmPasswordException $e){ - $correct = false; - $confirmPasswordErr = $e->getMessage(); - } - - try{ - $location = test_input(($_POST["location"])); - checkInputChoice($location, "lettersAndSpaces"); - } catch(lettersAndSpacesException $e){ - $correct = false; - $locationErr = $e->getMessage(); - } - - try{ - $email = test_input(($_POST["email"])); - checkInputChoice($email, "email"); - $confirmEmail = test_input(($_POST["confirmEmail"])); - matchEmail(); - } catch(emailException $e){ - $correct = false; - $emailErr = $e->getMessage(); - } catch(confirmEmailException $e){ - $correct = false; - $confirmEmailErr = $e->getMessage(); - } - - try{ - $captcha = $_POST['g-recaptcha-response']; - checkCaptcha($captcha); - } catch(captchaException $e){ - $correct = false; - $captchaErr = $e->getMessage(); - } - - try { - getIp(); - registerCheck($correct); - sendConfirmEmailUsername($username); - } catch(registerException $e){ - echo ""; - $genericErr = $e->getMessage(); - } + include("register.php"); } } -// // Trying to login -// if ($_SERVER["REQUEST_METHOD"] == "POST") { -// try{ -// $uname = ($_POST["uname"]); -// validateLogin($_POST["uname"], $_POST["psw"]); -// } catch(loginException $e) { -// $loginErr = $e->getMessage(); -// } -// } - /* This view adds login view */ include("../views/login-view.php"); ?> diff --git a/website/public/register(stash).php b/website/public/register(stash).php new file mode 100644 index 0000000..0077e62 --- /dev/null +++ b/website/public/register(stash).php @@ -0,0 +1,115 @@ + + + + +getMessage(); + } + + try { + $surname = test_input(($_POST["surname"])); + checkInputChoice($surname, "lettersAndSpaces"); + } + catch(lettersAndSpacesException $e){ + $correct = false; + $surnameErr = $e->getMessage(); + } + + try{ + $day_date = test_input(($_POST["day_date"])); + $month_date = test_input(($_POST["month_date"])); + $year_date = test_input(($_POST["year_date"])); + $bday = $year_date . "-" . $month_date . "-" . $day_date; + checkInputChoice($bday, "bday"); + } catch(bdayException $e){ + $correct = false; + $bdayErr = $e->getMessage(); + } + + try{ + $username = str_replace(' ', '', test_input(($_POST["username"]))); + checkInputChoice($username, "username"); + } catch(usernameException $e){ + $correct = false; + $usernameErr = $e->getMessage(); + } + + try{ + $password = str_replace(' ', '', test_input(($_POST["password"]))); + checkInputChoice($password, "longerEight"); + matchPassword(); + } catch(passwordException $e){ + $correct = false; + $passwordErr = $e->getMessage(); + } catch(confirmPasswordException $e){ + $correct = false; + $confirmPasswordErr = $e->getMessage(); + } + + try{ + $location = test_input(($_POST["location"])); + checkInputChoice($location, "lettersAndSpaces"); + } catch(lettersAndSpacesException $e){ + $correct = false; + $locationErr = $e->getMessage(); + } + + try{ + $email = test_input(($_POST["email"])); + checkInputChoice($email, "email"); + $confirmEmail = test_input(($_POST["confirmEmail"])); + matchEmail(); + } catch(emailException $e){ + $correct = false; + $emailErr = $e->getMessage(); + } catch(confirmEmailException $e){ + $correct = false; + $confirmEmailErr = $e->getMessage(); + } + + try{ + $captcha = $_POST['g-recaptcha-response']; + checkCaptcha($captcha); + } catch(captchaException $e){ + $correct = false; + $captchaErr = $e->getMessage(); + } + + try { + getIp(); + registerCheck($correct); + sendConfirmEmailUsername($username); + } catch(registerException $e){ + $genericErr = $e->getMessage(); + } + } +/* This view adds register view */ +include("../views/register-view.php"); +?> + + diff --git a/website/public/register.php b/website/public/register.php index 0077e62..ee19930 100644 --- a/website/public/register.php +++ b/website/public/register.php @@ -1,115 +1,90 @@ - - - -getMessage(); +} - // Trying to register an account - if ($_SERVER["REQUEST_METHOD"] == "POST") { - try { - $name = test_input(($_POST["name"])); - checkInputChoice($name, "lettersAndSpaces"); - } catch(lettersAndSpacesException $e){ - $correct = false; - $nameErr = $e->getMessage(); - } +try { + $surname = test_input(($_POST["surname"])); + checkInputChoice($surname, "lettersAndSpaces"); +} +catch(lettersAndSpacesException $e){ + $correct = false; + $surnameErr = $e->getMessage(); +} - try { - $surname = test_input(($_POST["surname"])); - checkInputChoice($surname, "lettersAndSpaces"); - } - catch(lettersAndSpacesException $e){ - $correct = false; - $surnameErr = $e->getMessage(); - } +try{ + $day_date = test_input(($_POST["day_date"])); + $month_date = test_input(($_POST["month_date"])); + $year_date = test_input(($_POST["year_date"])); + $bday = $year_date . "-" . $month_date . "-" . $day_date; + checkInputChoice($bday, "bday"); +} catch(bdayException $e){ + $correct = false; + $bdayErr = $e->getMessage(); +} - try{ - $day_date = test_input(($_POST["day_date"])); - $month_date = test_input(($_POST["month_date"])); - $year_date = test_input(($_POST["year_date"])); - $bday = $year_date . "-" . $month_date . "-" . $day_date; - checkInputChoice($bday, "bday"); - } catch(bdayException $e){ - $correct = false; - $bdayErr = $e->getMessage(); - } +try{ + $username = str_replace(' ', '', test_input(($_POST["username"]))); + checkInputChoice($username, "username"); +} catch(usernameException $e){ + $correct = false; + $usernameErr = $e->getMessage(); +} - try{ - $username = str_replace(' ', '', test_input(($_POST["username"]))); - checkInputChoice($username, "username"); - } catch(usernameException $e){ - $correct = false; - $usernameErr = $e->getMessage(); - } +try{ + $password = str_replace(' ', '', test_input(($_POST["password"]))); + checkInputChoice($password, "longerEight"); + matchPassword(); +} catch(passwordException $e){ + $correct = false; + $passwordErr = $e->getMessage(); +} catch(confirmPasswordException $e){ + $correct = false; + $confirmPasswordErr = $e->getMessage(); +} - try{ - $password = str_replace(' ', '', test_input(($_POST["password"]))); - checkInputChoice($password, "longerEight"); - matchPassword(); - } catch(passwordException $e){ - $correct = false; - $passwordErr = $e->getMessage(); - } catch(confirmPasswordException $e){ - $correct = false; - $confirmPasswordErr = $e->getMessage(); - } +try{ + $location = test_input(($_POST["location"])); + checkInputChoice($location, "lettersAndSpaces"); +} catch(lettersAndSpacesException $e){ + $correct = false; + $locationErr = $e->getMessage(); +} - try{ - $location = test_input(($_POST["location"])); - checkInputChoice($location, "lettersAndSpaces"); - } catch(lettersAndSpacesException $e){ - $correct = false; - $locationErr = $e->getMessage(); - } +try{ + $email = test_input(($_POST["email"])); + checkInputChoice($email, "email"); + $confirmEmail = test_input(($_POST["confirmEmail"])); + matchEmail(); +} catch(emailException $e){ + $correct = false; + $emailErr = $e->getMessage(); +} catch(confirmEmailException $e){ + $correct = false; + $confirmEmailErr = $e->getMessage(); +} - try{ - $email = test_input(($_POST["email"])); - checkInputChoice($email, "email"); - $confirmEmail = test_input(($_POST["confirmEmail"])); - matchEmail(); - } catch(emailException $e){ - $correct = false; - $emailErr = $e->getMessage(); - } catch(confirmEmailException $e){ - $correct = false; - $confirmEmailErr = $e->getMessage(); - } +try{ + $captcha = $_POST['g-recaptcha-response']; + checkCaptcha($captcha); +} catch(captchaException $e){ + $correct = false; + $captchaErr = $e->getMessage(); +} - try{ - $captcha = $_POST['g-recaptcha-response']; - checkCaptcha($captcha); - } catch(captchaException $e){ - $correct = false; - $captchaErr = $e->getMessage(); - } - - try { - getIp(); - registerCheck($correct); - sendConfirmEmailUsername($username); - } catch(registerException $e){ - $genericErr = $e->getMessage(); - } - } -/* This view adds register view */ -include("../views/register-view.php"); -?> - - +try { + getIp(); + registerCheck($correct); + sendConfirmEmailUsername($username); +} catch(registerException $e){ + echo ""; + $genericErr = $e->getMessage(); +} \ No newline at end of file diff --git a/website/public/styles/index.css b/website/public/styles/index.css index 85cc670..f5d40a7 100644 --- a/website/public/styles/index.css +++ b/website/public/styles/index.css @@ -28,10 +28,10 @@ body { form { /*background-color: #a87a87;*/ border-radius: 12px; - height: 80%; + height: 85%; margin: auto; width: 600px; - overflow-y:auto; + overflow-y: auto; overflow-x: hidden; } @@ -46,13 +46,13 @@ h1 { /* registreer titel*/ h2 { - padding: 16px; + padding: 8px; text-align: left; font-size: 2.0em; } h3 { - padding: 16px; + padding: 8px; text-align: center; font-size: 1.5em; } @@ -63,7 +63,7 @@ input[type=text], input[type=password], input[type=email], input[type="date"] { display: inline-block; height: 60%; font-size: 16px; - padding: 8px 20px; + padding: 8px 10px; margin: 4px 0; width: 55%; } @@ -79,7 +79,7 @@ button { cursor: pointer; height: 50%; padding: 8px 20px; - margin: 10px; + margin: 5px; font-family: Arial; font-size: 22px; box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); @@ -90,6 +90,7 @@ button { font-family: Arial; font-size: 15px; color: red; + text-align: left; } label { @@ -98,19 +99,19 @@ label { /* padding voor registreer container */ .login_containerregister { - padding: 16px; + padding: 8px; text-align: left; } /* padding voor login_containers */ .login_containerlogin { - padding:16px; + padding:8px; text-align: center; } /* padding voor foutmelding login */ .login_containerfault { - padding: 16px; + padding: 4px; text-align: center; color: red; } @@ -129,7 +130,7 @@ label { background-attachment: fixed;*/ box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); height: 400px; - margin: 34px auto; + margin: 16px auto; overflow-y: auto; padding: 20px; width: 600px; @@ -149,12 +150,12 @@ ul { display: none; /* Hidden by default */ position: fixed; /* Stay in place */ z-index: 1; /* Sit on top */ - padding-top: 100px; /* Location of the box */ + padding-top: 30px; /* Location of the box */ left: 0; top: 0; width: 100%; /* Full width */ height: 100%; /* Full height */ - overflow: auto; /* Enable scroll if needed */ + overflow: hidden; /* Enable scroll if needed */ background-color: rgb(0,0,0); /* Fallback color */ background-color: rgba(0,0,0,0.4); /* Black w/ opacity */ } @@ -166,7 +167,7 @@ ul { margin: auto; padding: 0; border: 1px solid #888; - width: 589px; + width: 600px; box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19); -webkit-animation-name: animatetop; -webkit-animation-duration: 0.4s; @@ -189,7 +190,7 @@ ul { .close { color: white; float: right; - font-size: 28px; + font-size: 36px; font-weight: bold; } @@ -201,7 +202,7 @@ ul { } .modal-header { - padding: 2px 16px; + padding: 4px 16px; background-color: #FBC02D; color: black; } diff --git a/website/queries/login.php b/website/queries/login.php index 6af9e1e..b686659 100644 --- a/website/queries/login.php +++ b/website/queries/login.php @@ -13,7 +13,7 @@ function getUser() { `email` LIKE :username "); - $stmt->bindParam(":username", test_input($_POST["user"])); + $stmt->bindValue(":username", test_input($_POST["user"])); $stmt->execute(); return $stmt->fetch(PDO::FETCH_ASSOC); } @@ -42,6 +42,9 @@ function validateLogin($username, $password){ "; } else { $_SESSION["userID"] = $userID; + if($_POST[rememberMe] == 1){ + ini_set("session.gc_maxlifetime", "10"); + } header("location: profile.php"); } } else { diff --git a/website/views/bdayInput.php b/website/views/bdayInput.php new file mode 100644 index 0000000..f3ddecc --- /dev/null +++ b/website/views/bdayInput.php @@ -0,0 +1,37 @@ + + + diff --git a/website/views/forgotPasswordModal.php b/website/views/forgotPasswordModal.php new file mode 100644 index 0000000..a84ae68 --- /dev/null +++ b/website/views/forgotPasswordModal.php @@ -0,0 +1,35 @@ + + + + + \ No newline at end of file diff --git a/website/views/login-view.php b/website/views/login-view.php index b9052b3..fa7f8fd 100644 --- a/website/views/login-view.php +++ b/website/views/login-view.php @@ -32,6 +32,11 @@ >
    + + @@ -49,269 +54,52 @@ + +// When the user clicks anywhere outside of the modal, close it + window.onclick = function (event) { + if (event.target == modal) { + modal.style.display = "none"; + } + if (event.target == registerModal) { + registerModal.style.display = "none"; + } + } + \ No newline at end of file diff --git a/website/views/register-view.php b/website/views/register-view.php index 9577216..acb5f4b 100644 --- a/website/views/register-view.php +++ b/website/views/register-view.php @@ -41,14 +41,6 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +
    + + +
    \ No newline at end of file -- 2.49.1 From ce6a75163047b4209846129d748f620565a1cbbb Mon Sep 17 00:00:00 2001 From: Marijn Jansen Date: Fri, 27 Jan 2017 12:30:28 +0100 Subject: [PATCH 116/256] Niet slecht inverted --- website/views/post-view.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/views/post-view.php b/website/views/post-view.php index 4e0ddb1..e3ceb9b 100644 --- a/website/views/post-view.php +++ b/website/views/post-view.php @@ -30,9 +30,9 @@ echo(" -- 2.49.1 From 5e9629eddd5ccdf983c384602951a25f468b3081 Mon Sep 17 00:00:00 2001 From: Joey Lai Date: Fri, 27 Jan 2017 14:03:11 +0100 Subject: [PATCH 117/256] Fixed bugs --- website/public/js/registerAndLogin.js | 6 +- website/public/register.php | 155 +++++++++++++------------- website/public/styles/index.css | 4 + website/queries/checkInput.php | 4 +- website/queries/login.php | 6 +- website/queries/register.php | 20 ++-- website/views/bdayInput.php | 24 ++-- website/views/forgotPasswordModal.php | 1 + website/views/login-view.php | 15 ++- website/views/registerModal.php | 5 +- 10 files changed, 127 insertions(+), 113 deletions(-) diff --git a/website/public/js/registerAndLogin.js b/website/public/js/registerAndLogin.js index b2fda05..87522cf 100644 --- a/website/public/js/registerAndLogin.js +++ b/website/public/js/registerAndLogin.js @@ -1,5 +1,5 @@ function checkLoggedIn() { - if (confirm("You are already logged in!\nDo you want to logout?\nPress ok to logout.") == true) { + if (confirm("U bent al ingelogd!!\nWilt u uitloggen?\nKlik ok om uit te loggen.") == true) { window.location.href = "logout.php"; } else { window.location.href = "profile.php"; @@ -7,9 +7,9 @@ function checkLoggedIn() { } function bannedAlert(){ - alert("Your account is banned"); + alert("Uw account is geband!"); } function emailNotConfirmed(){ - alert("Your account has not been verified yet!\nAnother email has been sent to you") + alert("Uw account is nog niet bevestigd!\nEr is een nieuwe email gestuurd om uw account te bevestigen"); } diff --git a/website/public/register.php b/website/public/register.php index ee19930..6bebd7e 100644 --- a/website/public/register.php +++ b/website/public/register.php @@ -1,90 +1,91 @@ getMessage(); -} -try { - $surname = test_input(($_POST["surname"])); - checkInputChoice($surname, "lettersAndSpaces"); -} -catch(lettersAndSpacesException $e){ - $correct = false; - $surnameErr = $e->getMessage(); -} + try { + $name = test_input(($_POST["name"])); + checkInputChoice($name, "lettersAndSpaces"); + } catch(lettersAndSpacesException $e){ + $correct = false; + $nameErr = $e->getMessage(); + } -try{ - $day_date = test_input(($_POST["day_date"])); - $month_date = test_input(($_POST["month_date"])); - $year_date = test_input(($_POST["year_date"])); - $bday = $year_date . "-" . $month_date . "-" . $day_date; - checkInputChoice($bday, "bday"); -} catch(bdayException $e){ - $correct = false; - $bdayErr = $e->getMessage(); -} + try { + $surname = test_input(($_POST["surname"])); + checkInputChoice($surname, "lettersAndSpaces"); + } + catch(lettersAndSpacesException $e){ + $correct = false; + $surnameErr = $e->getMessage(); + } -try{ - $username = str_replace(' ', '', test_input(($_POST["username"]))); - checkInputChoice($username, "username"); -} catch(usernameException $e){ - $correct = false; - $usernameErr = $e->getMessage(); -} + try{ + $day_date = test_input(($_POST["day_date"])); + $month_date = test_input(($_POST["month_date"])); + $year_date = test_input(($_POST["year_date"])); + $bday = $year_date . "-" . $month_date . "-" . $day_date; + checkInputChoice($bday, "bday"); + } catch(bdayException $e){ + $correct = false; + $bdayErr = $e->getMessage(); + } -try{ - $password = str_replace(' ', '', test_input(($_POST["password"]))); - checkInputChoice($password, "longerEight"); - matchPassword(); -} catch(passwordException $e){ - $correct = false; - $passwordErr = $e->getMessage(); -} catch(confirmPasswordException $e){ - $correct = false; - $confirmPasswordErr = $e->getMessage(); -} + try{ + $username = str_replace(' ', '', test_input(($_POST["username"]))); + checkInputChoice($username, "username"); + } catch(usernameException $e){ + $correct = false; + $usernameErr = $e->getMessage(); + } -try{ - $location = test_input(($_POST["location"])); - checkInputChoice($location, "lettersAndSpaces"); -} catch(lettersAndSpacesException $e){ - $correct = false; - $locationErr = $e->getMessage(); -} + try{ + $password = str_replace(' ', '', test_input(($_POST["password"]))); + checkInputChoice($password, "longerEight"); + matchPassword(); + } catch(passwordException $e){ + $correct = false; + $passwordErr = $e->getMessage(); + } catch(confirmPasswordException $e){ + $correct = false; + $confirmPasswordErr = $e->getMessage(); + } -try{ - $email = test_input(($_POST["email"])); - checkInputChoice($email, "email"); - $confirmEmail = test_input(($_POST["confirmEmail"])); - matchEmail(); -} catch(emailException $e){ - $correct = false; - $emailErr = $e->getMessage(); -} catch(confirmEmailException $e){ - $correct = false; - $confirmEmailErr = $e->getMessage(); -} + try{ + $location = test_input(($_POST["location"])); + checkInputChoice($location, "lettersAndSpaces"); + } catch(lettersAndSpacesException $e){ + $correct = false; + $locationErr = $e->getMessage(); + } -try{ - $captcha = $_POST['g-recaptcha-response']; - checkCaptcha($captcha); -} catch(captchaException $e){ - $correct = false; - $captchaErr = $e->getMessage(); -} + try{ + $email = test_input(($_POST["email"])); + checkInputChoice($email, "email"); + $confirmEmail = test_input(($_POST["confirmEmail"])); + matchEmail(); + } catch(emailException $e){ + $correct = false; + $emailErr = $e->getMessage(); + } catch(confirmEmailException $e){ + $correct = false; + $confirmEmailErr = $e->getMessage(); + } -try { - getIp(); - registerCheck($correct); - sendConfirmEmailUsername($username); -} catch(registerException $e){ - echo ""; - $genericErr = $e->getMessage(); -} \ No newline at end of file + $genericErr = $e->getMessage(); + } diff --git a/website/public/styles/index.css b/website/public/styles/index.css index f5d40a7..6f7caf0 100644 --- a/website/public/styles/index.css +++ b/website/public/styles/index.css @@ -68,6 +68,10 @@ input[type=text], input[type=password], input[type=email], input[type="date"] { width: 55%; } +.middle{ + text-align: center; +} + .center{ text-align: center; } diff --git a/website/queries/checkInput.php b/website/queries/checkInput.php index fbf64a7..52b830f 100644 --- a/website/queries/checkInput.php +++ b/website/queries/checkInput.php @@ -124,11 +124,11 @@ function matchPassword(){ /* Checks if captcha is correctly filled in */ function checkCaptcha($captcha){ if(!$captcha){ - throw new captchaException("Captcha needs to be filled in!"); + throw new captchaException("Captcha moet ingevuld worde!"); } else { $response=json_decode(file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=6Lc72xIUAAAAAPizuF3nUbklCPljVCVzgYespz8o&response=".$captcha."&remoteip=".$_SERVER['REMOTE_ADDR'])); if($response->success==false) { - throw new captchaException("You are a spammer!"); + throw new captchaException("Je bent een spammer!"); } } } diff --git a/website/queries/login.php b/website/queries/login.php index b686659..384a3d5 100644 --- a/website/queries/login.php +++ b/website/queries/login.php @@ -42,9 +42,9 @@ function validateLogin($username, $password){ "; } else { $_SESSION["userID"] = $userID; - if($_POST[rememberMe] == 1){ - ini_set("session.gc_maxlifetime", "10"); - } +// if($_POST[rememberMe] == 1){ +// ini_set("session.gc_maxlifetime", "10"); +// } header("location: profile.php"); } } else { diff --git a/website/queries/register.php b/website/queries/register.php index be9d415..bc44acf 100644 --- a/website/queries/register.php +++ b/website/queries/register.php @@ -10,7 +10,7 @@ function getExistingUsername() { `username` LIKE :username "); - $stmt->bindParam(":username", test_input($_POST["username"])); + $stmt->bindValue(":username", test_input($_POST["username"])); $stmt->execute(); return $stmt->rowCount(); @@ -26,7 +26,7 @@ function getExistingEmail() { `email` LIKE :email "); - $stmt->bindParam(":email", test_input($_POST["email"])); + $stmt->bindValue(":email", test_input($_POST["email"])); $stmt->execute(); return $stmt->rowCount(); @@ -42,7 +42,7 @@ function getResetEmail() { `email` LIKE :email "); - $stmt->bindParam(":email", test_input($_POST["forgotEmail"])); + $stmt->bindValue(":email", test_input($_POST["forgotEmail"])); $stmt->execute(); return $stmt->rowCount(); @@ -70,13 +70,13 @@ function registerAccount() { $hash=password_hash($_POST["password"], PASSWORD_DEFAULT); - $stmt->bindParam(":fname", test_input($_POST["name"])); - $stmt->bindParam(":lname", test_input($_POST["surname"])); - $stmt->bindParam(":bday", test_input($_POST["bday"])); - $stmt->bindParam(":username", test_input($_POST["username"])); - $stmt->bindParam(":password", test_input($hash)); - $stmt->bindParam(":location", test_input($_POST["location"])); - $stmt->bindParam(":email", test_input(strtolower($_POST["email"]))); + $stmt->bindValue(":fname", test_input($_POST["name"])); + $stmt->bindValue(":lname", test_input($_POST["surname"])); + $stmt->bindValue(":bday", test_input($_POST["bday"])); + $stmt->bindValue(":username", test_input($_POST["username"])); + $stmt->bindValue(":password", test_input($hash)); + $stmt->bindValue(":location", test_input($_POST["location"])); + $stmt->bindValue(":email", test_input(strtolower($_POST["email"]))); $stmt->execute(); $stmt->rowCount(); diff --git a/website/views/bdayInput.php b/website/views/bdayInput.php index f3ddecc..f4e440f 100644 --- a/website/views/bdayInput.php +++ b/website/views/bdayInput.php @@ -11,18 +11,18 @@ diff --git a/website/views/login-view.php b/website/views/login-view.php index fa7f8fd..8edc777 100644 --- a/website/views/login-view.php +++ b/website/views/login-view.php @@ -15,6 +15,7 @@ - - @@ -49,6 +46,11 @@ Inloggen + + @@ -78,7 +80,10 @@ var registerSpan = document.getElementsByClassName("close")[1]; // When the user clicks the button, open the modal btn.onclick = function () { +// modal.style.display = "block"; modal.style.display = "block"; + window.onload=emailSent(); + } registerBtn.onclick = function () { diff --git a/website/views/registerModal.php b/website/views/registerModal.php index f55c33a..b430ab8 100644 --- a/website/views/registerModal.php +++ b/website/views/registerModal.php @@ -19,6 +19,8 @@ return= $correct method="post"> + + @@ -135,7 +137,8 @@ -- 2.49.1 From e9eeeaf11045b6c98a7f52929c4cb906cf125db9 Mon Sep 17 00:00:00 2001 From: Joey Lai Date: Fri, 27 Jan 2017 14:17:56 +0100 Subject: [PATCH 118/256] fixed idk --- website/queries/requestpassword.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/queries/requestpassword.php b/website/queries/requestpassword.php index c0ff462..bae825a 100644 --- a/website/queries/requestpassword.php +++ b/website/queries/requestpassword.php @@ -50,5 +50,5 @@ function setHashToDatabase(int $userID, string $hash) { $stmt->bindParam(":hash", $hash); $stmt->bindParam(":userID", $userID); $stmt->execute(); - return $stmt->rowCount(); + $stmt->rowCount(); } \ No newline at end of file -- 2.49.1 From 7e2c20e2447a10fd449bc718e4b735bf5b589559 Mon Sep 17 00:00:00 2001 From: Marijn Jansen Date: Fri, 27 Jan 2017 15:40:07 +0100 Subject: [PATCH 119/256] Added showEmail and showBday to the settings page --- website/queries/settings.php | 49 ++++++++++++++++++++++++++++----- website/views/settings-view.php | 26 +++++++++++++++++ 2 files changed, 68 insertions(+), 7 deletions(-) diff --git a/website/queries/settings.php b/website/queries/settings.php index 0bf8791..05e7fbf 100644 --- a/website/queries/settings.php +++ b/website/queries/settings.php @@ -1,6 +1,10 @@ fetch(); } +/** + * Gets the passwordHas form the database + * @return mixed passwordhash + */ function getPasswordHash() { $stmt = $GLOBALS["db"]->prepare(" SELECT @@ -73,6 +91,10 @@ function getPasswordHash() { return $stmt->fetch(); } +/** + * Changes the setting from post. + * @throws HappyAlert + */ function updateSettings() { $stmt = $GLOBALS["db"]->prepare(" UPDATE @@ -82,7 +104,9 @@ function updateSettings() { `lname` = :lname, `location` = :location, `birthdate` = :bday, - `bio` = :bio + `bio` = :bio, + `showEmail` = :showEmail, + `showBday` = :showBday WHERE `userID` = :userID "); @@ -92,15 +116,22 @@ function updateSettings() { $stmt->bindValue(":location", test_input($_POST["location"])); $stmt->bindValue(":bday", test_input($_POST["bday"])); $stmt->bindValue(":bio", test_input($_POST["bio"])); + $stmt->bindValue(":showEmail", test_input($_POST["showEmail"])); + $stmt->bindValue(":showBday", test_input($_POST["showBday"])); + $stmt->bindValue(":userID", $_SESSION["userID"]); $stmt->execute(); throw new HappyAlert("Instellingen zijn opgeslagen."); } +/** + * Change + * @throws AngryAlert + */ function changePassword() { $user = getPasswordHash(); - if (password_verify($_POST["password-old"], $user["password"])) { - if ($_POST["password-new"] == $_POST["password-confirm"] && (strlen($_POST["password-new"]) >= 8)) { + if (password_verify($_POST["password-old"], test_input($user["password"]))) { + if (test_input($_POST["password-new"]) == test_input($_POST["password-confirm"]) && (strlen(test_input($_POST["password-new"])) >= 8)) { doChangePassword(); } else { throw new AngryAlert("Wachtwoorden komen niet overeen."); @@ -110,6 +141,10 @@ function changePassword() { } } +/** + * @throws AngryAlert + * @throws HappyAlert + */ function doChangePassword() { $stmt = $GLOBALS["db"]->prepare(" UPDATE @@ -134,8 +169,8 @@ function doChangePassword() { function changeEmail() { - if ($_POST["email"] == $_POST["email-confirm"]) { - $email = strtolower($_POST["email"]); + if (test_input($_POST["email"]) == test_input($_POST["email-confirm"])) { + $email = strtolower(test_input($_POST["email"])); if (filter_var($email, FILTER_VALIDATE_EMAIL)) { //check if email exists emailIsAvailableInDatabase($email); @@ -193,7 +228,6 @@ function updateAvatar() { $tmpImg = $_FILES["pp"]["tmp_name"]; checkAvatarSize($tmpImg); - removeOldAvatar(); if (getimagesize($tmpImg)["mime"] == "image/gif") { if ($_FILES["pp"]["size"] > 4000000) { throw new AngryAlert("Bestand is te groot, maximaal 4MB toegestaan."); @@ -205,6 +239,7 @@ function updateAvatar() { $scaledImg = scaleAvatar($tmpImg); imagepng($scaledImg, $profilePictureDir . $relativePath); } + removeOldAvatar(); setAvatarToDatabase("../" . $relativePath); throw new HappyAlert("Profielfoto veranderd."); } diff --git a/website/views/settings-view.php b/website/views/settings-view.php index 66513fc..b6a3b4c 100644 --- a/website/views/settings-view.php +++ b/website/views/settings-view.php @@ -51,6 +51,32 @@ $settings = getSettings(); value="" > +
  • + + + > Ja + + > Nee +
  • +
  • + + + > Ja + + > Nee +

  • - - -- 2.49.1 From 9a36dea59219f037eb266412fd090d1b950a1f1b Mon Sep 17 00:00:00 2001 From: Marijn Jansen Date: Mon, 30 Jan 2017 13:22:44 +0100 Subject: [PATCH 132/256] Removed a comma --- website/views/post-view.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/views/post-view.php b/website/views/post-view.php index 81aca46..264d67c 100644 --- a/website/views/post-view.php +++ b/website/views/post-view.php @@ -50,7 +50,7 @@ echo("
    $commentauthor - + $commentnicetime
    -- 2.49.1 From 54ddb784531c5dc8ae57cba6bf8cc6cf2416bc4f Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Mon, 30 Jan 2017 13:59:02 +0100 Subject: [PATCH 133/256] Chat receive messages is now better --- website/public/js/chat.js | 36 +++++++++++++++++++------------ website/public/styles/main.css | 1 - website/public/styles/profile.css | 3 --- website/queries/friendship.php | 6 ++++++ website/views/menu.php | 2 +- 5 files changed, 29 insertions(+), 19 deletions(-) diff --git a/website/public/js/chat.js b/website/public/js/chat.js index 773a819..0f32fa6 100644 --- a/website/public/js/chat.js +++ b/website/public/js/chat.js @@ -1,25 +1,30 @@ var previousDate = new Date("1970-01-01 00:00:00"); +var gettingMessages = false; + $(document).ready(function() { - loadMessages(); + setInterval(loadMessages, 2000); sayEmpty(); $(".chat-field").hide(); }); function loadMessages() { - $.post( - "API/loadMessages.php", - $("#lastIDForm").serialize() - ).done(function(data) { - if (data && data != "[]") { - messages = JSON.parse(data); - addMessages(messages); - $("#lastID").val(messages[messages.length - 1].messageID); - $("#chat-history").scrollTop($("#chat-history")[0].scrollHeight); - } - }); - - setTimeout(loadMessages, 1000); + if (!gettingMessages) { + gettingMessages = true; + $.post( + "API/loadMessages.php", + $("#lastIDForm").serialize() + ).done(function (data) { + if (data && data != "[]") { + messages = JSON.parse(data); + addMessages(messages); + $("#lastID").val(messages[messages.length - 1].messageID); + } + gettingMessages = false; + }); + } else { + setTimeout(loadMessages, 500); + } } @@ -30,6 +35,7 @@ function sendMessage() { ); $("#newContent").val(""); + loadMessages(); } function addMessages(messages) { @@ -59,6 +65,8 @@ function addMessages(messages) {
    \ '); } + + $("#chat-history").scrollTop($("#chat-history")[0].scrollHeight); } function switchUser(userID) { diff --git a/website/public/styles/main.css b/website/public/styles/main.css index be2f4f7..3eb0bb3 100644 --- a/website/public/styles/main.css +++ b/website/public/styles/main.css @@ -97,7 +97,6 @@ p { } .item-box, .item-box-full-width { - margin: 20px 0 0 0; padding: 25px; background-color: #FFFFFF; } diff --git a/website/public/styles/profile.css b/website/public/styles/profile.css index 2fe819a..03ab19f 100644 --- a/website/public/styles/profile.css +++ b/website/public/styles/profile.css @@ -2,7 +2,6 @@ .user-box { text-align: center; - margin-bottom: 50px; } .status-buttons-container { @@ -64,14 +63,12 @@ } div.posts { - padding-top: 20px; width: calc(100% + 20px); display: inline-flex; } div.posts div.post { display: block; - margin: 20px 0 0 0; padding: 10px; width: calc(100% - 40px); cursor: pointer; diff --git a/website/queries/friendship.php b/website/queries/friendship.php index a1a23d8..01e3d8a 100644 --- a/website/queries/friendship.php +++ b/website/queries/friendship.php @@ -29,6 +29,12 @@ function selectLimitedFriends($userID, $limit) { `friendship`.`user1ID` = `user`.`userID`) AND `user`.`role` != 'banned' AND `friendship`.`status` = 'confirmed' + ORDER BY + CASE + WHEN `friendship`.`user2ID` = `user`.`userID` THEN `friendship`.`chatLastVisted1` + WHEN `friendship`.`user1ID` = `user`.`userID` THEN `friendship`.`chatLastVisted2` + END + DESC LIMIT :limitCount "); diff --git a/website/views/menu.php b/website/views/menu.php index 0444384..f3f3cde 100644 --- a/website/views/menu.php +++ b/website/views/menu.php @@ -1,7 +1,7 @@
  • @@ -25,15 +24,14 @@ while ($group = $q->fetch(PDO::FETCH_ASSOC)) { class='checkbox-list' value='$groupID' form='admin-groupbatchform' - onchange='$function'> + onchange='checkCheckAll();'> - + @@ -14,7 +14,6 @@ while($user = $q->fetch(PDO::FETCH_ASSOC)) { $username = $user['username']; $role = $user['role']; $bancomment = $user['bancomment']; - $function = "checkCheckAll(document.getElementById('checkall'))"; echo(" @@ -24,20 +23,29 @@ while($user = $q->fetch(PDO::FETCH_ASSOC)) { class='checkbox-list' value='$userID' form='admin-batchform' - onchange='$function'> + onchange='checkCheckAll();'> - + - + - + @@ -33,9 +33,9 @@ while ($group = $q->fetch(PDO::FETCH_ASSOC)) { diff --git a/website/views/adminpanel-table.php b/website/views/adminpanel-table.php index aa790e6..f7bc966 100644 --- a/website/views/adminpanel-table.php +++ b/website/views/adminpanel-table.php @@ -55,7 +55,8 @@ while($user = $q->fetch(PDO::FETCH_ASSOC)) { OR $user['role'] == 'owner'))) { echo " - "; + + "; if ($userinfo == 'owner') { echo " diff --git a/website/views/adminpanel.php b/website/views/adminpanel.php index a4da648..2c0bec2 100644 --- a/website/views/adminpanel.php +++ b/website/views/adminpanel.php @@ -67,13 +67,13 @@ if (isset($_GET["groupstatus"])) { id="frozen" value="frozen" > -
    +
    > -
    +
    > - +
    @@ -122,6 +122,7 @@ if (isset($_GET["groupstatus"])) { + Maak Owner"; + value=\"owner\">Maak Eigenaar"; } ?> @@ -139,9 +140,9 @@ if (isset($_GET["groupstatus"])) { onsubmit="adminUpdate(this); return false;"> - - - + + +
    -- 2.49.1 From cfa7c870f08417b80d5d7c285207deb0e94db228 Mon Sep 17 00:00:00 2001 From: Hendrik Date: Thu, 2 Feb 2017 15:13:35 +0100 Subject: [PATCH 220/256] fix profile error color --- website/public/styles/profile.css | 4 ++++ website/views/profile.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/website/public/styles/profile.css b/website/public/styles/profile.css index dbb3d24..46906d2 100644 --- a/website/public/styles/profile.css +++ b/website/public/styles/profile.css @@ -5,6 +5,10 @@ background-color: firebrick; } +.alerttext { + color: white; +} + .user-box { text-align: center; } diff --git a/website/views/profile.php b/website/views/profile.php index 7348642..4139099 100644 --- a/website/views/profile.php +++ b/website/views/profile.php @@ -1,6 +1,6 @@
    - +
    -- 2.49.1 From 8a3cfebf55bbc8380034c25741f52682beb2b9aa Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Thu, 2 Feb 2017 15:34:45 +0100 Subject: [PATCH 221/256] Redirect to 404 from profile and group --- website/public/group.php | 9 ++++++++- website/public/profile.php | 7 ++++++- website/queries/group_page.php | 7 ++++++- website/queries/user.php | 4 +++- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/website/public/group.php b/website/public/group.php index bb393e3..84726fa 100644 --- a/website/public/group.php +++ b/website/public/group.php @@ -13,9 +13,16 @@ include_once("../queries/group_page.php"); -$group = selectGroupByName($_GET["groupname"]); +if(!$group = selectGroupByName($_GET["groupname"])) { + header("HTTP/1.0 404 Not Found"); + header("Location: error/404.php"); + die(); +} + + $members = selectGroupMembers($group["groupID"]); + /* * This view adds the main layout over the screen. * Header, menu, footer. diff --git a/website/public/profile.php b/website/public/profile.php index aa4cf7c..126c87f 100644 --- a/website/public/profile.php +++ b/website/public/profile.php @@ -25,7 +25,12 @@ if(empty($_GET["username"])) { $userID = getUserID($_GET["username"]); } -$user = selectUser($_SESSION["userID"], $userID); +if(!$user = selectUser($_SESSION["userID"], $userID)) { + header("HTTP/1.0 404 Not Found"); + header("Location: error/404.php"); + die(); +} + $profile_friends = selectAllFriends($userID); $profile_groups = selectAllUserGroups($userID); $showProfile = $user["showProfile"] || ($user["status"] == 'confirmed') || $_SESSION["userID"] == $userID; diff --git a/website/queries/group_page.php b/website/queries/group_page.php index f2f028f..a6676c4 100644 --- a/website/queries/group_page.php +++ b/website/queries/group_page.php @@ -33,7 +33,12 @@ function selectGroupByName($name) { if (!$stmt->execute()) { return False; } - return $stmt->fetch(); + $row = $stmt->fetch(); + if($row["groupID"] == null) { + return False; + } + + return $row; } function selectGroupRole(int $groupID) { diff --git a/website/queries/user.php b/website/queries/user.php index 972937d..836c956 100644 --- a/website/queries/user.php +++ b/website/queries/user.php @@ -101,7 +101,9 @@ function selectUser($me, $other) { $stmt->bindParam(':me', $me, PDO::PARAM_INT); $stmt->bindParam(':other', $other, PDO::PARAM_INT); - $stmt->execute(); + if(!$stmt->execute() || $stmt->rowCount() == 0) { + return False; + } return $stmt->fetch(); } -- 2.49.1 From 1c53eab2fa77c02aaeb7340a38b053d38c0cf335 Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Thu, 2 Feb 2017 15:50:12 +0100 Subject: [PATCH 222/256] Fixed user group list on profile page. --- website/queries/user.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/queries/user.php b/website/queries/user.php index 06487be..422edc4 100644 --- a/website/queries/user.php +++ b/website/queries/user.php @@ -122,7 +122,7 @@ function selectAllUserGroups($userID) { `group_page`.`groupID` = `group_member`.`groupID` WHERE `userID` = :userID AND - `role` = 'member' + `role` IN ('member', 'mod', 'admin') "); $stmt->bindParam(':userID', $userID, PDO::PARAM_INT); -- 2.49.1 From afb45d6709c6ddf640bac34844ac4e3ac8f38055 Mon Sep 17 00:00:00 2001 From: Hendrik Date: Thu, 2 Feb 2017 15:51:27 +0100 Subject: [PATCH 223/256] add closing of modal on escape key and clicking outside --- website/public/js/masonry.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/website/public/js/masonry.js b/website/public/js/masonry.js index a628e96..107f710 100644 --- a/website/public/js/masonry.js +++ b/website/public/js/masonry.js @@ -83,6 +83,21 @@ $(window).on("load", function() { loadMorePosts(userID, groupID, postAmount, postLimit); } }; + + $(document).keyup(function(e) { + if (e.keyCode == 27) { + closeModal(); + } + }); + + $('.modal').click(function() { + closeModal(); + }); + + $('.modal-content').click(function(event){ + event.stopPropagation(); + }); + }); function closeModal() { -- 2.49.1 From 380d8fa83a7ea8780f09fd8c1a8df7965b8f45b1 Mon Sep 17 00:00:00 2001 From: Marijn Jansen Date: Thu, 2 Feb 2017 16:01:45 +0100 Subject: [PATCH 224/256] Group Shit --- website/public/createGroup.php | 36 +++++++++++++++ website/public/groupAdmin.php | 46 ++++++++++++++++++++ website/queries/createGroup.php | 37 ++++++++++++++++ website/queries/groupAdmin.php | 61 ++++++++++++++++++++++++++ website/queries/picture.php | 12 ++--- website/views/createGroup.php | 42 ++++++++++++++++++ website/views/groupAdmin.php | 77 +++++++++++++++++++++++++++++++++ website/views/menu.php | 2 +- 8 files changed, 306 insertions(+), 7 deletions(-) create mode 100644 website/public/createGroup.php create mode 100644 website/public/groupAdmin.php create mode 100644 website/queries/createGroup.php create mode 100644 website/queries/groupAdmin.php create mode 100644 website/views/createGroup.php create mode 100644 website/views/groupAdmin.php diff --git a/website/public/createGroup.php b/website/public/createGroup.php new file mode 100644 index 0000000..ffeb6e3 --- /dev/null +++ b/website/public/createGroup.php @@ -0,0 +1,36 @@ + + + + + + + + + + + diff --git a/website/public/groupAdmin.php b/website/public/groupAdmin.php new file mode 100644 index 0000000..13ff7e0 --- /dev/null +++ b/website/public/groupAdmin.php @@ -0,0 +1,46 @@ + + + + + + + + +getClass(); + $alertMessage = $w->getMessage(); + } +} + +/* Add your view files here. */ +include("../views/groupAdmin.php"); + +/* This adds the footer. */ +include("../views/footer.php"); +?> + + diff --git a/website/queries/createGroup.php b/website/queries/createGroup.php new file mode 100644 index 0000000..20ee28b --- /dev/null +++ b/website/queries/createGroup.php @@ -0,0 +1,37 @@ +bindValue(':name', test_input($_POST["groupName"]), PDO::PARAM_STR); + $createGroup->bindValue(':description', test_input($_POST["bio"])); + $createGroup->execute(); + + $getGroupID = prepareQuery(" + SELECT + `groupID` + FROM + `group_page` + WHERE + `name` LIKE :name"); + $getGroupID->bindValue(':name', test_input($_POST["groupName"]), PDO::PARAM_STR); + $getGroupID->execute(); + $groupID = $getGroupID->fetch()["groupID"]; + + $makeUserAdmin = prepareQuery(" + INSERT INTO + `group_member` (userID, groupID, role) + VALUES (:userID, :groupID, 'admin') + "); + $makeUserAdmin->bindValue(":userID", $_SESSION["userID"]); + $makeUserAdmin->bindValue("groupID", $groupID); + $makeUserAdmin->execute(); + + updateAvatar($groupID); +} \ No newline at end of file diff --git a/website/queries/groupAdmin.php b/website/queries/groupAdmin.php new file mode 100644 index 0000000..ae2abd3 --- /dev/null +++ b/website/queries/groupAdmin.php @@ -0,0 +1,61 @@ +bindParam(":groupID", $groupID); + $stmt->execute(); + return $stmt->fetch(); +} + +function updateGroupSettings(int $groupID) +{ + if (!checkGroupAdmin($groupID, $_SESSION["userID"])) { + throw new AngryAlert("Je hebt geen rechten in deze groep"); + } + $stmt = prepareQuery(" + UPDATE + `group_page` + SET + `name` = :name, + `description` = :bio + WHERE + `groupID` = :groupID + "); + $stmt->bindValue(":bio", test_input($_POST["bio"])); + $stmt->bindValue(":name", test_input($_POST["name"])); + $stmt->bindValue(":groupID", test_input($_POST["groupID"])); + $stmt->execute(); + if ($stmt->rowCount()) { + throw new HappyAlert("Groep aangepast!"); + } else { + throw new AngryAlert("Er is iets mis gegaan"); + } +} + +function checkGroupAdmin(int $groupID, int $userID) : bool { + $stmt = prepareQuery(" + SELECT + `role` + FROM + `group_member` + WHERE + `groupID` = :groupID AND + `userID` = :userID + "); + $stmt->bindValue(":userID", $userID); + $stmt->bindValue(":groupID", $groupID); + $stmt->execute(); + if (!$stmt->rowCount()) { + return false; + } + $role = $stmt->fetch()["role"]; + return ($role == "admin"); +} \ No newline at end of file diff --git a/website/queries/picture.php b/website/queries/picture.php index 8e99d9a..ba27f72 100644 --- a/website/queries/picture.php +++ b/website/queries/picture.php @@ -6,7 +6,7 @@ * @throws AngryAlert * @throws HappyAlert */ -function updateAvatar(bool $group = false) { +function updateAvatar(int $group = 0) { $publicDir = "/var/www/html/public/"; $tmpImg = $_FILES["pp"]["tmp_name"]; $avatarDir = $group ? "uploads/groupavatar/" : "uploads/profilepictures/"; @@ -16,17 +16,17 @@ function updateAvatar(bool $group = false) { if ($_FILES["pp"]["size"] > 4000000) { throw new AngryAlert("Bestand is te groot, maximaal 4MB toegestaan."); } - $relativePath = $avatarDir . $_SESSION["userID"] . "_avatar.gif"; - $group ? removeOldGroupAvatar($_POST["groupID"]) : removeOldUserAvatar(); + $relativePath = $group ? $avatarDir . $group . "_avatar.gif" : $avatarDir . $_SESSION["userID"] . "_avatar.gif"; + $group ? removeOldGroupAvatar($group) : removeOldUserAvatar(); move_uploaded_file($tmpImg, $publicDir . $relativePath); } else { - $relativePath = $avatarDir . $_SESSION["userID"] . "_avatar.png"; + $relativePath = $group ? $avatarDir . $group . "_avatar.png": $avatarDir . $_SESSION["userID"] . "_avatar.png"; $scaledImg = scaleAvatar($tmpImg); - $group ? removeOldGroupAvatar($_POST["groupID"]) : removeOldUserAvatar(); + $group ? removeOldGroupAvatar($group) : removeOldUserAvatar(); imagepng($scaledImg, $publicDir . $relativePath); } - $group ? setGroupAvatarToDatabase("../" . $relativePath, $_POST["groupID"]) : setUserAvatarToDatabase("../" . $relativePath); + $group ? setGroupAvatarToDatabase("../" . $relativePath, $group) : setUserAvatarToDatabase("../" . $relativePath); throw new HappyAlert("Profielfoto veranderd."); } diff --git a/website/views/createGroup.php b/website/views/createGroup.php new file mode 100644 index 0000000..736fc45 --- /dev/null +++ b/website/views/createGroup.php @@ -0,0 +1,42 @@ + + +
    +
    +
    +
    Maak een groep!
    +
      +
    • + + +
    • +
    • + + +
    • +
    • + + +
    • +
    • + + +
    • +
    + +
    +
    diff --git a/website/views/groupAdmin.php b/website/views/groupAdmin.php new file mode 100644 index 0000000..66b38f5 --- /dev/null +++ b/website/views/groupAdmin.php @@ -0,0 +1,77 @@ + +
    +
    + +
    + +
    + +
    +
    Groep Instellingen
    + "> +
      +
    • + + " + > +
    • +
    • + + + +
    • +
    • + + +
    • +
    + +
    +
    Verander groepsafbeelding.
    + "> +
      +
    • + + " + class="group-picture" + > +
    • +
    • + + +
    • +
    • + + +
    • +
    + +
    +
    \ No newline at end of file diff --git a/website/views/menu.php b/website/views/menu.php index dab8fce..03e0f56 100644 --- a/website/views/menu.php +++ b/website/views/menu.php @@ -14,7 +14,7 @@ +
    + +
    \ No newline at end of file -- 2.49.1 From 74e91ed7cb18acebaabd5b6356f87aec25830977 Mon Sep 17 00:00:00 2001 From: Marijn Jansen Date: Thu, 2 Feb 2017 21:14:25 +0100 Subject: [PATCH 230/256] Add mods/admin to a group. --- website/public/groupAdmin.php | 27 ++++++++++++++----- website/queries/groupAdmin.php | 48 ++++++++++++++++++++++++++++++++++ website/queries/settings.php | 15 +++++++++++ website/views/groupAdmin.php | 29 ++++++++++++++++++++ 4 files changed, 113 insertions(+), 6 deletions(-) diff --git a/website/public/groupAdmin.php b/website/public/groupAdmin.php index 13ff7e0..6095149 100644 --- a/website/public/groupAdmin.php +++ b/website/public/groupAdmin.php @@ -23,12 +23,27 @@ $alertClass; $alertMessage; if ($_SERVER["REQUEST_METHOD"] == "POST") { try { - if ($_POST["form"] == "group") { - updateGroupSettings($_POST["groupID"]); - } else if ($_POST["form"] == "picture") { - if (checkGroupAdmin($_POST["groupID"], $_SESSION["userID"])) { - updateAvatar($_POST["groupID"]); - } + switch ($_POST["form"]) { + case "group": + updateGroupSettings($_POST["groupID"]); + break; + case "picture": + if (checkGroupAdmin($_POST["groupID"], $_SESSION["userID"])) { + updateAvatar($_POST["groupID"]); + } + break; + case "mod": + if (!array_key_exists("userID", $_POST)) { + throw new AngryAlert("Geen gebruiker geselecteerd."); + } + upgradeUser($_POST["groupID"], $_POST["userID"], "mod"); + break; + case "admin": + if (!array_key_exists("userID", $_POST)) { + throw new AngryAlert("Geen gebruiker geselecteerd."); + } + upgradeUser($_POST["groupID"], $_POST["userID"], "admin"); + break; } } catch (AlertMessage $w) { $alertClass = $w->getClass(); diff --git a/website/queries/groupAdmin.php b/website/queries/groupAdmin.php index ae2abd3..e3580b6 100644 --- a/website/queries/groupAdmin.php +++ b/website/queries/groupAdmin.php @@ -58,4 +58,52 @@ function checkGroupAdmin(int $groupID, int $userID) : bool { } $role = $stmt->fetch()["role"]; return ($role == "admin"); +} + +function getAllGroupMembers(int $groupID) { + $stmt = prepareQuery(" + SELECT + `username`, + `user`.`userID`, + CONCAT(`fname`, ' ', `lname`) AS `fullname`, + `group_member`.`role` + FROM + `group_member` + LEFT JOIN + `user` + ON + `group_member`.`userID` = `user`.`userID` + WHERE + `groupID` = :groupID AND `group_member`.`role` = 'member' + "); + + $stmt->bindParam(':groupID', $groupID); + if (!$stmt->execute()) { + return False; + } + return $stmt->fetchAll(); +} + +function upgradeUser(int $groupID, int $userID, string $role) { + if (!checkGroupAdmin($groupID, $_SESSION["userID"])) { + throw new AngryAlert("Geen toestemming om te wijzigen"); + } + + $stmt = prepareQuery(" + UPDATE + `group_member` + SET + `role` = :role + WHERE + `userID` = :userID AND `groupID` = :groupID + "); + $stmt->bindValue(":groupID", $groupID); + $stmt->bindValue(":userID", $userID); + $stmt->bindValue(":role", $role); + $stmt->execute(); + if ($stmt->rowCount()) { + throw new HappyAlert("Permissie aangepast!"); + } else { + throw new AngryAlert("Er is iets mis gegaan"); + } } \ No newline at end of file diff --git a/website/queries/settings.php b/website/queries/settings.php index 9b17d17..26237ec 100644 --- a/website/queries/settings.php +++ b/website/queries/settings.php @@ -148,6 +148,10 @@ function doChangePassword() { } } +/** + * Changes the users email if it is valid. + * @throws AngryAlert + */ function changeEmail() { if (test_input($_POST["email"]) == test_input($_POST["email-confirm"])) { @@ -164,6 +168,11 @@ function changeEmail() { } } +/** + * Checks if an emailadres is available in the database. + * @param $email + * @throws AngryAlert + */ function emailIsAvailableInDatabase($email) { $stmt = prepareQuery(" SELECT @@ -181,6 +190,12 @@ function emailIsAvailableInDatabase($email) { } } +/** + * Does the actual changing of an email-adress. + * @param $email + * @throws AngryAlert + * @throws HappyAlert + */ function doChangeEmail($email) { $stmt = prepareQuery(" UPDATE diff --git a/website/views/groupAdmin.php b/website/views/groupAdmin.php index a28553e..54fbee8 100644 --- a/website/views/groupAdmin.php +++ b/website/views/groupAdmin.php @@ -85,6 +85,35 @@ $groupinfo = getGroupSettings($_GET["groupID"]); +
    +
    Voeg een admin/mod toe
    +
      + + " type="hidden"> + + + + + +
    +
    • -- 2.49.1 From 7e4107ac8b357bc1335c9657293182a5ce18720c Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Fri, 3 Feb 2017 00:13:23 +0100 Subject: [PATCH 231/256] Added fancy buttons in profile --- website/public/js/friendButtons.js | 28 +++++++++++++++------------- website/public/js/groupButtons.js | 12 ++++++------ website/public/styles/post-popup.css | 12 ------------ website/public/styles/profile.css | 19 ++++++++++++------- website/views/post-view.php | 4 ++-- website/views/profile.php | 14 ++++++++++---- 6 files changed, 45 insertions(+), 44 deletions(-) diff --git a/website/public/js/friendButtons.js b/website/public/js/friendButtons.js index 47c476a..303ccf9 100644 --- a/website/public/js/friendButtons.js +++ b/website/public/js/friendButtons.js @@ -19,24 +19,24 @@ function placeFriendButtons() { case "0": value1 = "request"; class1 = "green"; - text1 = "Bevriend"; - icon1 = "fa-handshake-o"; + text1 = "Word vrienden"; + icon1 = "fa-user-plus"; break; case "1": value1 = userID; class1 = "green"; text1 = "Chat"; - icon1 = "fa-comment-o"; + icon1 = "fa-comment"; value2 = "delete"; class2 = "red"; - text2 = "Verwijder"; - icon2 = "fa-times"; + text2 = "Ontvriend"; + icon2 = "fa-user-times"; break; case "2": value1 = "delete"; class1 = "red"; text1 = "Trek verzoek in"; - icon1 = "fa-cross"; + icon1 = "fa-times"; break; case "3": value1 = "accept"; @@ -51,16 +51,18 @@ function placeFriendButtons() { } $buttonContainer.append( - ""); + "
      "); $buttonContainer.append( - ""); + "
      "); - $buttonContainer.children().click(function() { + $buttonContainer.find("button").click(function() { if (isNaN(this.value)) editFriendship(userID, this.value); else if (this.value != "") diff --git a/website/public/js/groupButtons.js b/website/public/js/groupButtons.js index 549277d..caf3ab8 100644 --- a/website/public/js/groupButtons.js +++ b/website/public/js/groupButtons.js @@ -5,23 +5,23 @@ function placeGroupButtons() { if (data == 'none') { $buttonContainer.append( - ""); } else if (data == 'request') { $buttonContainer.append( - ""); } else if (data == 'admin') { $buttonContainer.append( - "" ); } else { $buttonContainer.append( - ""); } diff --git a/website/public/styles/post-popup.css b/website/public/styles/post-popup.css index 9493b83..e82129b 100644 --- a/website/public/styles/post-popup.css +++ b/website/public/styles/post-popup.css @@ -92,16 +92,4 @@ .deleteButton { background-color: firebrick; float: right; -} - -.deleteButton i { - display: inline-block; -} - -.deleteButton:hover span { - display: inline-block; -} - -.deleteButton span { - display: none; } \ No newline at end of file diff --git a/website/public/styles/profile.css b/website/public/styles/profile.css index 18e105e..8a93d12 100644 --- a/website/public/styles/profile.css +++ b/website/public/styles/profile.css @@ -27,16 +27,21 @@ display: inline-block; } +.friend-button-container div, .status-buttons-container div { + width: 200px; + display: inline-block; +} + .friend-button-container button, .status-buttons-container button, .group-button-container button { display: block; + float: right; margin: 7px 0; font-size: 18px; } - -.friend-button-container button, .status-buttons-container button, .group-button-fixed { - width: 200px; +.status-buttons-container button { + float: left; } .group-button-container button { @@ -76,19 +81,19 @@ border: none; } -.group-button-fancy span { +.fancy-button span { display: none; } -.group-button-fancy:hover { +.fancy-button:hover { text-align: right; } -.group-button-fancy i { +.fancy-button i { display: inline-block; } -.group-button-fancy:hover span { +.fancy-button:hover span { display: inline-block; margin-right: 5px; } diff --git a/website/views/post-view.php b/website/views/post-view.php index 717e6a8..fadc791 100644 --- a/website/views/post-view.php +++ b/website/views/post-view.php @@ -13,11 +13,11 @@ $fullname = $post['fname'] . " " . $post['lname'] . " (" . $post['username'] . "
    -
    diff --git a/website/views/profile.php b/website/views/profile.php index 62157f4..0cb5cc2 100644 --- a/website/views/profile.php +++ b/website/views/profile.php @@ -7,10 +7,16 @@ <?= $user[" class="profile-picture main-picture " src="">
    - - +
    + +
    +
    + +

    :)

    -- 2.49.1 From 6d739a4480019709d6abe9addea37ade0ebbc34d Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Fri, 3 Feb 2017 00:24:38 +0100 Subject: [PATCH 232/256] Chat is now only loading the last 100 messages --- website/queries/private_message.php | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/website/queries/private_message.php b/website/queries/private_message.php index 3b88563..f2df887 100644 --- a/website/queries/private_message.php +++ b/website/queries/private_message.php @@ -6,18 +6,23 @@ function getOldChatMessages($user2ID) { if (getFriendshipStatus($user2ID) == 1) { $stmt = prepareQuery(" SELECT - * + * FROM - `private_message` - WHERE - `origin` = :user1 AND - `destination` = :user2 OR - `origin` = :user2 AND - `destination` = :user1 + (SELECT + * + FROM + `private_message` + WHERE + `origin` = :user1 AND + `destination` = :user2 OR + `origin` = :user2 AND + `destination` = :user1 + ORDER BY + `messageID` DESC + LIMIT + 100) sub ORDER BY - `creationdate` ASC - LIMIT - 100 + `messageID` ASC "); $stmt->bindParam(":user1", $user1ID); @@ -76,7 +81,7 @@ function getNewChatMessages($lastID, $destination) { `destination` = :user1) AND `messageID` > :lastID ORDER BY - `creationdate` ASC + `messageID` ASC "); $stmt->bindParam(':user1', $_SESSION["userID"]); -- 2.49.1 From 1a3efe9669089acffc404151616d26b1d3f9d984 Mon Sep 17 00:00:00 2001 From: Joey Lai Date: Fri, 3 Feb 2017 10:12:37 +0100 Subject: [PATCH 233/256] Fixed W3Validation and url GETs --- website/public/fb-callback.php | 71 -------------- website/public/register(stash).php | 116 ----------------------- website/public/styles/index.css | 6 -- website/queries/checkInput.php | 6 +- website/queries/login.php | 7 +- website/views/facebookRegisterModal.php | 8 +- website/{public => views}/fbRegister.php | 0 website/views/forgotPasswordModal.php | 4 +- website/views/homeLoginRegister.php | 38 ++++---- website/views/login-view.php | 13 ++- website/{public => views}/register.php | 0 website/views/registerModal.php | 13 +-- 12 files changed, 43 insertions(+), 239 deletions(-) delete mode 100644 website/public/fb-callback.php delete mode 100644 website/public/register(stash).php rename website/{public => views}/fbRegister.php (100%) rename website/{public => views}/register.php (100%) diff --git a/website/public/fb-callback.php b/website/public/fb-callback.php deleted file mode 100644 index 0ed0369..0000000 --- a/website/public/fb-callback.php +++ /dev/null @@ -1,71 +0,0 @@ - $appID, // Replace {app-id} with your app id - 'app_secret' => $appSecret, - 'default_graph_version' => 'v2.2', -]); - -$helper = $fb->getRedirectLoginHelper(); - -try { - $accessToken = $helper->getAccessToken(); -} catch(Facebook\Exceptions\FacebookResponseException $e) { - // When Graph returns an error - echo 'Graph returned an error: ' . $e->getMessage(); - exit; -} catch(Facebook\Exceptions\FacebookSDKException $e) { - // When validation fails or other local issues - echo 'Facebook SDK returned an error: ' . $e->getMessage(); - exit; -} - -if (! isset($accessToken)) { - if ($helper->getError()) { - header('HTTP/1.0 401 Unauthorized'); - echo "Error: " . $helper->getError() . "\n"; - echo "Error Code: " . $helper->getErrorCode() . "\n"; - echo "Error Reason: " . $helper->getErrorReason() . "\n"; - echo "Error Description: " . $helper->getErrorDescription() . "\n"; - } else { - header('HTTP/1.0 400 Bad Request'); - echo 'Bad request'; - } - exit; -} - -// Logged in -echo '

    Access Token

    '; -var_dump($accessToken->getValue()); - -// The OAuth 2.0 client handler helps us manage access tokens -$oAuth2Client = $fb->getOAuth2Client(); - -// Get the access token metadata from /debug_token -$tokenMetadata = $oAuth2Client->debugToken($accessToken); -echo '

    Metadata

    '; -var_dump($tokenMetadata); - -// Validation (these will throw FacebookSDKException's when they fail) -$tokenMetadata->validateAppId($appID); // Replace {app-id} with your app id -// If you know the user ID this access token belongs to, you can validate it here -//$tokenMetadata->validateUserId('123'); -$tokenMetadata->validateExpiration(); - -if (! $accessToken->isLongLived()) { - // Exchanges a short-lived access token for a long-lived one - try { - $accessToken = $oAuth2Client->getLongLivedAccessToken($accessToken); - } catch (Facebook\Exceptions\FacebookSDKException $e) { - echo "

    Error getting long-lived access token: " . $helper->getMessage() . "

    \n\n"; - exit; - } - - echo '

    Long-lived

    '; - var_dump($accessToken->getValue()); -} - -$_SESSION['fb_access_token'] = (string) $accessToken; - -// User is logged in with a long-lived access token. -// You can redirect them to a members-only page. -//header('Location: https://example.com/members.php'); \ No newline at end of file diff --git a/website/public/register(stash).php b/website/public/register(stash).php deleted file mode 100644 index 99ebc02..0000000 --- a/website/public/register(stash).php +++ /dev/null @@ -1,116 +0,0 @@ - - - - -getMessage(); - } - - try { - $surname = test_input(($_POST["surname"])); - checkInputChoice($surname, "lettersAndSpaces"); - } - catch(lettersAndSpacesException $e){ - $correct = false; - $surnameErr = $e->getMessage(); - } - - try{ - $day_date = test_input(($_POST["day_date"])); - $month_date = test_input(($_POST["month_date"])); - $year_date = test_input(($_POST["year_date"])); - $bday = $year_date . "-" . $month_date . "-" . $day_date; - checkInputChoice($bday, "bday"); - } catch(bdayException $e){ - $correct = false; - $bdayErr = $e->getMessage(); - } - - try{ - $username = str_replace(' ', '', test_input(($_POST["username"]))); - checkInputChoice($username, "username"); - } catch(usernameException $e){ - $correct = false; - $usernameErr = $e->getMessage(); - } - - try{ - $password = str_replace(' ', '', test_input(($_POST["password"]))); - checkInputChoice($password, "longerEight"); - matchPassword(); - } catch(passwordException $e){ - $correct = false; - $passwordErr = $e->getMessage(); - } catch(confirmPasswordException $e){ - $correct = false; - $confirmPasswordErr = $e->getMessage(); - } - - try{ - $location = test_input(($_POST["location"])); - checkInputChoice($location, "lettersAndSpaces"); - } catch(lettersAndSpacesException $e){ - $correct = false; - $locationErr = $e->getMessage(); - } - - try{ - $email = test_input(($_POST["email"])); - checkInputChoice($email, "email"); - $confirmEmail = test_input(($_POST["confirmEmail"])); - matchEmail(); - } catch(emailException $e){ - $correct = false; - $emailErr = $e->getMessage(); - } catch(confirmEmailException $e){ - $correct = false; - $confirmEmailErr = $e->getMessage(); - } - - try{ - $captcha = $_POST['g-recaptcha-response']; - checkCaptcha($captcha); - } catch(captchaException $e){ - $correct = false; - $captchaErr = $e->getMessage(); - } - - try { - getIp(); - registerCheck($correct); - sendConfirmEmailUsername($username); - } catch(registerException $e){ - $genericErr = $e->getMessage(); - } - } -/* This view adds register view */ -include("../views/register-view.php"); -?> - - diff --git a/website/public/styles/index.css b/website/public/styles/index.css index c7a0aa8..68191ad 100644 --- a/website/public/styles/index.css +++ b/website/public/styles/index.css @@ -198,12 +198,6 @@ ul { animation-duration: 0.4s } -/* Add Animation */ -@-webkit-keyframes animatetop { - from {top:-300px; opacity:0} - to {top:0; opacity:1} -} - @keyframes animatetop { from {top:-300px; opacity:0} to {top:0; opacity:1} diff --git a/website/queries/checkInput.php b/website/queries/checkInput.php index 69274ce..247050b 100644 --- a/website/queries/checkInput.php +++ b/website/queries/checkInput.php @@ -68,7 +68,7 @@ function validateBday($variable){ } } -// Checks for date +/* Checks for date */ function validateDate($date, $format) { $d = DateTime::createFromFormat($format, $date); @@ -124,7 +124,7 @@ function validateEmail($variable){ throw new emailException("Mag maximaal 50 karakters!"); } } -//255 + /* checks if an input is a valid email. */ function validateFBEmail($variable){ if (empty($variable)) { @@ -138,6 +138,7 @@ function validateFBEmail($variable){ } } +/* checks if email is the same */ function matchEmail(){ if (strtolower($_POST["email"]) != strtolower($_POST["confirmEmail"])){ throw new confirmEmailException("Emails matchen niet!"); @@ -153,7 +154,6 @@ function resetEmail($variable){ } } - /* checks if two passwords matches. */ function matchPassword(){ if ($_POST["password"] != $_POST["confirmpassword"]) { diff --git a/website/queries/login.php b/website/queries/login.php index 27c1f3b..3480991 100644 --- a/website/queries/login.php +++ b/website/queries/login.php @@ -1,5 +1,6 @@ @@ -75,8 +77,9 @@ function validateLogin($username, $password, $url){ $_SESSION["userID"] = $userID; if(!isset($url) or $url == "") { header("location: profile.php"); + echo "succes"; } else{ - header("location: $url"); + header("location: ".$url); } } diff --git a/website/views/facebookRegisterModal.php b/website/views/facebookRegisterModal.php index 7271d63..a38a3a3 100644 --- a/website/views/facebookRegisterModal.php +++ b/website/views/facebookRegisterModal.php @@ -1,7 +1,6 @@
    - * +
    - + diff --git a/website/public/fbRegister.php b/website/views/fbRegister.php similarity index 100% rename from website/public/fbRegister.php rename to website/views/fbRegister.php diff --git a/website/views/forgotPasswordModal.php b/website/views/forgotPasswordModal.php index 2ebdbb9..ebb9d64 100644 --- a/website/views/forgotPasswordModal.php +++ b/website/views/forgotPasswordModal.php @@ -4,7 +4,6 @@ diff --git a/website/views/homeLoginRegister.php b/website/views/homeLoginRegister.php index 55277e7..ad7be40 100644 --- a/website/views/homeLoginRegister.php +++ b/website/views/homeLoginRegister.php @@ -11,16 +11,16 @@ if(isset($_SESSION["userID"])){ // Facebook variables $appID = "353857824997532"; $appSecret = "db47e91ffbfd355fdd11b4b65eade851"; -$fbUsername = $fbPassword = $fbConfirmpassword = ""; +$fbUsername = $fbPassword = $fbConfirmpassword = $fbName = $fbSurname = $fbBday = $fbEmail = $fbUserID = ""; $fbUsernameErr = $fbPasswordErr = $fbConfirmpasswordErr = $fbEmailErr = $fbBdayErr = ""; $fbCorrect = true; -$fbName = $fbSurname = $fbBday = $fbEmail = $fbUserID = ""; // Register variables $name = $surname = $bday = $username = $password = $confirmpassword = $location = $housenumber = $email = $confirmEmail = $captcha = $ip = ""; $genericErr = $nameErr = $surnameErr = $bdayErr = $usernameErr = $passwordErr = $confirmpasswordErr = $locationErr = $housenumberErr = $emailErr = $confirmEmailErr = $captchaErr = ""; $correct = true; +// Bday dates $day_date = $month_date = $year_date = ""; $fbDay_date = $fbMonth_date = $fbYear_date = ""; @@ -28,22 +28,14 @@ $fbDay_date = $fbMonth_date = $fbYear_date = ""; $user = $psw = $remember =""; $loginErr = $resetErr = $fbRegisterErr =""; -//if ($_SERVER["REQUEST_METHOD"] == "GET") { -// try { -// $user = ($_POST["user"]); -// validateLogin($_POST["user"], $_POST["psw"], "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"); -// } catch(loginException $e) { -// $loginErr = $e->getMessage(); -// } -//} - if ($_SERVER["REQUEST_METHOD"] == "POST") { + $url = $_POST["url"]; // Checks for which button is pressed switch ($_POST["submit"]) { case "login": try { $user = ($_POST["user"]); - validateLogin($_POST["user"], $_POST["psw"], $_POST["url"]); + validateLogin($_POST["user"], $_POST["psw"], $url); } catch(loginException $e) { $loginErr = $e->getMessage(); } @@ -62,18 +54,22 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { } break; case "register": - include("register.php"); + include("../views/register.php"); break; case "fbRegister": - include("fbRegister.php"); + include("../views/fbRegister.php"); break; } } + +// Get facebook information with facebook PHP SDK. $fb = new Facebook\Facebook([ 'app_id' => $appID, 'app_secret' => $appSecret, 'default_graph_version' => 'v2.2', ]); + +// Redirect back to login.php after logging/canceling with facebook. $redirect = "https://myhyvesbookplus.nl/login.php"; $helper = $fb->getRedirectLoginHelper(); @@ -88,6 +84,7 @@ try { exit; } +// If theres no facebook account logged in, ask for permission. if(!isset($acces_token)){ $permission=["email", "user_birthday"]; $loginurl=$helper->getLoginUrl($redirect,$permission); @@ -96,13 +93,14 @@ if(!isset($acces_token)){ $response = $fb->get('/me?fields=email,name,birthday'); $usernode = $response->getGraphUser(); + // Get facebook information $nameSplit = explode(" ", $usernode->getName()); $fbName = $nameSplit[0]; $fbSurname = $nameSplit[1]; $fbUserID = $usernode->getID(); $fbEmail = $usernode->getProperty("email"); -// $image = 'https://graph.facebook.com/' . $usernode->getId() . '/picture?width=200'; + // If there is an account, check if the account is banned or frozen. if (fbLogin($fbUserID) == 1) { $fbID = getfbUserID($fbUserID)["userID"]; $fbRole = getfbUserID($fbUserID)["role"]; @@ -110,16 +108,20 @@ if(!isset($acces_token)){ echo ""; + } else if($fbRole == "frozen"){ $_SESSION["userID"] = $fbID; echo ""; + window.onload=frozenAlert(); + window.location.href= 'profile.php'; + "; + } else { $_SESSION["userID"] = $fbID; header("location: profile.php"); + } + // Registration with faceobook if theres no account. } else { echo " diff --git a/website/views/login_head.php b/website/views/login_head.php index 9e580df..e8e3a84 100644 --- a/website/views/login_head.php +++ b/website/views/login_head.php @@ -3,6 +3,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MyHyvesbook+ Date: Fri, 3 Feb 2017 11:47:16 +0100 Subject: [PATCH 250/256] Added fbModal button --- website/public/js/loginRegisterModals.js | 5 ++++- website/views/facebookRegisterModal.php | 6 ++++++ website/views/homeLoginRegister.php | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/website/public/js/loginRegisterModals.js b/website/public/js/loginRegisterModals.js index 373fb7e..104dd02 100644 --- a/website/public/js/loginRegisterModals.js +++ b/website/public/js/loginRegisterModals.js @@ -7,7 +7,7 @@ var facebookModal = document.getElementById("fbModal"); // Get the button that opens the modal var registerBtn = document.getElementById("registerBtn"); var btn = document.getElementById("myBtn"); - +var fbBtn = document.getElementById("fbBtn"); // Get the element that closes the modal var span = document.getElementsByClassName("close")[0]; @@ -24,6 +24,9 @@ btn.onclick = function () { registerBtn.onclick = function () { registerModal.style.display = "block"; } +fbBtn.onclick = function () { + facebookModal.style.display = "block"; +} /** * WHen the user clicks on (X), close the modal diff --git a/website/views/facebookRegisterModal.php b/website/views/facebookRegisterModal.php index a38a3a3..17ce7ef 100644 --- a/website/views/facebookRegisterModal.php +++ b/website/views/facebookRegisterModal.php @@ -1,3 +1,9 @@ +Facebook registreer'; + +} +?> -- 2.49.1 From fb5f76c4993cab6d41ab7be8c246452a2f49a207 Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Fri, 3 Feb 2017 12:32:57 +0100 Subject: [PATCH 253/256] ? --- website/public/js/profile.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 website/public/js/profile.js diff --git a/website/public/js/profile.js b/website/public/js/profile.js deleted file mode 100644 index e69de29..0000000 -- 2.49.1 From 1ac6a7da87e1637e195e596f111df74c8742d8af Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Fri, 3 Feb 2017 12:40:33 +0100 Subject: [PATCH 254/256] Changed admin checkbox buttons --- website/public/styles/adminpanel.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/public/styles/adminpanel.css b/website/public/styles/adminpanel.css index 888b4ca..d04d8fa 100644 --- a/website/public/styles/adminpanel.css +++ b/website/public/styles/adminpanel.css @@ -1,9 +1,9 @@ .admin-panel input[type="radio"], input[type="checkbox"] { vertical-align: middle; - height: 28px; - width: 28px; - margin: 2px; + height: 14px; + width: 14px; + margin: 7px; } .table-checkbox { -- 2.49.1 From 4643dfcddb4f8ef314168cb0851c811d559d57bd Mon Sep 17 00:00:00 2001 From: Joey Lai Date: Fri, 3 Feb 2017 12:42:30 +0100 Subject: [PATCH 255/256] Fixed comments and links --- website/queries/register.php | 31 +++++++++++++++++++++++++++++ website/queries/requestpassword.php | 18 +++++++++++++++-- website/views/homeLoginRegister.php | 2 +- 3 files changed, 48 insertions(+), 3 deletions(-) diff --git a/website/queries/register.php b/website/queries/register.php index 3dcbed4..7f91dfa 100644 --- a/website/queries/register.php +++ b/website/queries/register.php @@ -1,5 +1,9 @@ rowCount(); } +/** + * Registers a new account with facebook register + */ function fbRegisterAccount() { $stmt = prepareQuery(" INSERT INTO @@ -158,6 +184,11 @@ function fbRegisterAccount() { return $stmt->execute(); } +/** + * Checks which dates need to be selected when there is an invalid registration. + * @param $date + * @param $value + */ function submitselect($date, $value){ if ($date == $value){ echo "selected"; diff --git a/website/queries/requestpassword.php b/website/queries/requestpassword.php index a54bd7d..daad355 100644 --- a/website/queries/requestpassword.php +++ b/website/queries/requestpassword.php @@ -1,6 +1,10 @@ getRedirectLoginHelper(); try { -- 2.49.1 From 7cc6450e6afde743509fcc83b3e8dadf0415509e Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Fri, 3 Feb 2017 13:19:00 +0100 Subject: [PATCH 256/256] Added comments to javascript code. --- website/public/js/friendButtons.js | 8 +++++- website/public/js/groupButtons.js | 5 ++++ website/public/js/masonry.js | 44 +++++++++++++++++++----------- 3 files changed, 40 insertions(+), 17 deletions(-) diff --git a/website/public/js/friendButtons.js b/website/public/js/friendButtons.js index 47c476a..440dfe5 100644 --- a/website/public/js/friendButtons.js +++ b/website/public/js/friendButtons.js @@ -1,6 +1,8 @@ +// Show the right friendship buttonsto the user. function placeFriendButtons() { $.post("API/getFriendshipStatus.php", { usr: userID }) .done(function(data) { + //save the friendship status var friendshipStatus = data; var $buttonContainer = $("div.friend-button-container"); $("#start-profile-chat").hide(); @@ -22,6 +24,7 @@ function placeFriendButtons() { text1 = "Bevriend"; icon1 = "fa-handshake-o"; break; + // Users are friends. case "1": value1 = userID; class1 = "green"; @@ -32,12 +35,14 @@ function placeFriendButtons() { text2 = "Verwijder"; icon2 = "fa-times"; break; + // This user sent request. case "2": value1 = "delete"; class1 = "red"; text1 = "Trek verzoek in"; icon1 = "fa-cross"; break; + // Other user sent request. case "3": value1 = "accept"; class1 = "green"; @@ -50,6 +55,7 @@ function placeFriendButtons() { break; } + // Append buttons to the container. $buttonContainer.append( ""); - + // Gets triggered when a friend button is triggered. $buttonContainer.children().click(function() { if (isNaN(this.value)) editFriendship(userID, this.value); diff --git a/website/public/js/groupButtons.js b/website/public/js/groupButtons.js index e6ada67..ab86e8c 100644 --- a/website/public/js/groupButtons.js +++ b/website/public/js/groupButtons.js @@ -3,16 +3,20 @@ function placeGroupButtons() { .done(function(data) { var $buttonContainer = $("div.group-button-container"); + // Append the right group button to the button container. + // When user is not a member if(data == 'none') { $buttonContainer.append( ""); + // when user sent a request to become a member. } else if(data == 'request') { $buttonContainer.append( ""); + // When user is a member of the group. } else { $buttonContainer.append( ""); } + // Gets triggered when a group button is clicked. $buttonContainer.children().click(function() { $.post("API/editMembership.php", { grp: groupID, role: this.value }) .done(function() { diff --git a/website/public/js/masonry.js b/website/public/js/masonry.js index a628e96..eeb5cf7 100644 --- a/website/public/js/masonry.js +++ b/website/public/js/masonry.js @@ -1,3 +1,4 @@ +// Vertical margin between two posts. margin = 20; // scrolling modal taken from http://stackoverflow.com/questions/10476632/how-to-scroll-the-page-when-a-modal-dialog-is-longer-than-the-screen @@ -11,9 +12,12 @@ function scrollbarMargin(width, overflow) { }); } +// Get post from the server. function requestPost(postID) { + // Make the modal view visible. $(".modal").show(); + // Send get request to the server to load the post. $.get("API/loadPost.php", { postID : postID }).done(function(data) { $('.modal-default').hide(); var scrollBarWidth = window.innerWidth - document.body.offsetWidth; @@ -23,11 +27,14 @@ function requestPost(postID) { }); } +// Create a new post. function postPost() { title = $("input.newpost[name='title']").val(); content = $("textarea.newpost[name='content']").val(); + // Masonrymode 2: when on group page and user is an admin. if (masonryMode == 2) { + // Create the new group post. $.post("API/postPost.php", { title: title, content : content, group : groupID }) @@ -42,6 +49,7 @@ function postPost() { } }); } else { + // Create the new user post. $.post("API/postPost.php", { title: title, content : content }) .done(function(data) { @@ -68,6 +76,7 @@ var postAmount = 0; var noposts = false; $(document).ready(function () { + // Initialise variables for masonry. windowWidth = $(window).width(); columnCount = Math.floor($(".posts").width() / 250); columns = new Array(columnCount); @@ -78,6 +87,7 @@ $(window).on("load", function() { $(".modal-close").click(function (){closeModal()}); // http://stackoverflow.com/questions/9439725/javascript-how-to-detect-if-browser-window-is-scrolled-to-bottom + // Infinite scroll. window.onscroll = function(ev) { if($(window).scrollTop() + $(window).height() == $(document).height() ) { loadMorePosts(userID, groupID, postAmount, postLimit); @@ -85,6 +95,7 @@ $(window).on("load", function() { }; }); +// Hide modal view from the screen. function closeModal() { $(".modal").hide(); scrollbarMargin(0, 'auto'); @@ -92,23 +103,30 @@ function closeModal() { $('.modal-default').show(); } +// Will fire when user resizes the window. $(window).resize(function() { clearTimeout(window.resizedFinished); window.resizeFinished = setTimeout(function() { + // Check if the width of the screen changed. if ($(window).width() != windowWidth) { + // Save width. windowWidth = $(window).width(); - + // Check if there fit more or less columns in the new width. if (columnCount != Math.floor($(".posts").width() / 250)) { columnCount = Math.floor($(".posts").width() / 250); + // Respawn the masonry grid. masonry(masonryMode); } } }, 250); }); +// Select the container for masonry. var $container = $(".posts"); +// Spawn the masonry grid. function masonry(mode) { + // save the masonry mode. masonryMode = mode; $container.children().remove(); @@ -116,10 +134,7 @@ function masonry(mode) { noposts = false; postAmount = 0; - /* - * Initialise columns. - */ - + // Initialise columns. for (i = 0; i < columnCount; i++) { $column = $("
    "); $column.width(100/columnCount + "%"); @@ -127,11 +142,13 @@ function masonry(mode) { columns[i] = [0, $column]; } + // Place the form for new posts. if(mode > 0) { $postInput = $("
    "); $form = $(""); $postInput.append($form); + //Add extra input for group posts. if(mode == 2) { $form.append($("")); } @@ -144,17 +161,11 @@ function masonry(mode) { columns[0][0] = $postInput.height() + margin; } - /* - * Function will find the column with the shortest height. - */ - - - /* - * Get the posts from the server. - */ + // Get the posts from the server. loadMorePosts(userID, groupID, 0, postLimit); } +// Find the column with the shortest hight. function getShortestColumn(columns) { column = columns[0]; @@ -166,17 +177,20 @@ function getShortestColumn(columns) { return column; } +// Load certain range of posts. function loadMorePosts(uID, gID, offset, limit) { if (noposts) { return; } + // Get a list of posts from the server. $.post("API/getPosts.php", { usr : uID, grp : gID, offset : offset, limit : limit}) .done(function(data) { if (!data) { + // No posts were found, show noposts bar to user. $('.noposts').show(); noposts = true; return; @@ -184,9 +198,7 @@ function loadMorePosts(uID, gID, offset, limit) { posts = JSON.parse(data); - /* - * Rearange the objects. - */ + // Rearange the objects. $.each(posts, function() { $post = $("
    "); $post.append($("

    ").html(this["title"])); -- 2.49.1

    - - UserGebruikersnaam StatusCommentActionAantekeningActie
    $name $role $description
    + onsubmit=\"adminUpdate(this); return false;\">
    Gebruikersnaam Status Aantekening
    $username $role $bancomment - + onsubmit=\"adminUpdate(this); return false;\"> + diff --git a/website/views/adminpanel.php b/website/views/adminpanel.php index c48a28d..d2b83d2 100644 --- a/website/views/adminpanel.php +++ b/website/views/adminpanel.php @@ -7,6 +7,7 @@ $perpage = 20; $status = array("user", "frozen", "banned", "unconfirmed", "admin", "owner"); $groupstatus = array("hidden", "public", "membersonly"); $pagetype = "user"; +$userinfo = getRoleByID($_SESSION['userID'])->fetch(PDO::FETCH_ASSOC); if (isset($_GET["search"])) { $search = test_input($_GET["search"]); @@ -123,20 +124,30 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { -
    + + + Maak Admin + "; + } + ?>
    -
    + + -- 2.49.1 From 422e2d13086ec6d501edf1aa71f8f6107ab53f32 Mon Sep 17 00:00:00 2001 From: Marijn Jansen Date: Mon, 30 Jan 2017 21:48:18 +0100 Subject: [PATCH 147/256] Date picker in bday --- website/queries/settings.php | 14 +++++++-- website/views/settings-view.php | 53 ++++++++++++++++++++++++++------- 2 files changed, 54 insertions(+), 13 deletions(-) diff --git a/website/queries/settings.php b/website/queries/settings.php index f4c5403..6c52fc4 100644 --- a/website/queries/settings.php +++ b/website/queries/settings.php @@ -110,20 +110,30 @@ function updateSettings() { WHERE `userID` = :userID "); + $bday = new DateTime(test_input($_POST["year"] . $_POST["month"] . $_POST["day"])); + checkBday($bday); $stmt->bindValue(":fname", test_input($_POST["fname"])); $stmt->bindValue(":lname", test_input($_POST["lname"])); $stmt->bindValue(":location", test_input($_POST["location"])); - $stmt->bindValue(":bday", test_input($_POST["bday"])); + $stmt->bindValue(":bday", $bday->format("Ymd")); $stmt->bindValue(":bio", test_input($_POST["bio"])); $stmt->bindValue(":showEmail", test_input($_POST["showEmail"])); - $stmt->bindValue(":showBday", test_input($_POST["showBday"])); + $stmt->bindValue(":showBday",test_input($_POST["showBday"])); $stmt->bindValue(":userID", $_SESSION["userID"]); $stmt->execute(); throw new HappyAlert("Instellingen zijn opgeslagen."); } +function checkBday(DateTime $bday) { + $today = new DateTime(); + if ($bday >= $today) { + throw new AngryAlert("Jij bent vast niet in de toekomst geboren toch? ;)"); + } +} + + /** * Change * @throws AngryAlert diff --git a/website/views/settings-view.php b/website/views/settings-view.php index b6a3b4c..1079c91 100644 --- a/website/views/settings-view.php +++ b/website/views/settings-view.php @@ -44,37 +44,68 @@ $settings = getSettings();
  • - " - > + + + +
  • + > Ja + > Nee
  • + > Ja + > Nee
  • @@ -189,4 +220,4 @@ $settings = getSettings();
  • - \ No newline at end of file + -- 2.49.1 From ce53b6e9e4e592b55a4f1918862e01ba50bbc4c5 Mon Sep 17 00:00:00 2001 From: Marijn Jansen Date: Mon, 30 Jan 2017 22:42:47 +0100 Subject: [PATCH 148/256] Checkbox for showBday and showEmail --- website/queries/settings.php | 7 ++-- website/views/settings-view.php | 58 +++++++++++++-------------------- 2 files changed, 26 insertions(+), 39 deletions(-) diff --git a/website/queries/settings.php b/website/queries/settings.php index 6c52fc4..bdc9d38 100644 --- a/website/queries/settings.php +++ b/website/queries/settings.php @@ -110,7 +110,8 @@ function updateSettings() { WHERE `userID` = :userID "); - $bday = new DateTime(test_input($_POST["year"] . $_POST["month"] . $_POST["day"])); + $bday = new DateTime(); + $bday->setDate(test_input($_POST["year"]), test_input($_POST["month"]), test_input($_POST["day"])); checkBday($bday); $stmt->bindValue(":fname", test_input($_POST["fname"])); @@ -118,8 +119,8 @@ function updateSettings() { $stmt->bindValue(":location", test_input($_POST["location"])); $stmt->bindValue(":bday", $bday->format("Ymd")); $stmt->bindValue(":bio", test_input($_POST["bio"])); - $stmt->bindValue(":showEmail", test_input($_POST["showEmail"])); - $stmt->bindValue(":showBday",test_input($_POST["showBday"])); + $stmt->bindValue(":showEmail", (array_key_exists("showEmail", $_POST) ? "1" : "0")); + $stmt->bindValue(":showBday", (array_key_exists("showBday", $_POST) ? "1" : "0")); $stmt->bindValue(":userID", $_SESSION["userID"]); $stmt->execute(); diff --git a/website/views/settings-view.php b/website/views/settings-view.php index 1079c91..6271a45 100644 --- a/website/views/settings-view.php +++ b/website/views/settings-view.php @@ -45,30 +45,30 @@ $settings = getSettings();
  • - + "; - + + + - format("Y"); for ($year = $now; $year >= 1900; $year--): ?> @@ -80,33 +80,19 @@ $settings = getSettings();
  • - - > Ja - - > Nee + >
  • - - > Ja - - > Nee + >
  • @@ -220,4 +206,4 @@ $settings = getSettings(); - + \ No newline at end of file -- 2.49.1 From 8dfa31696c8c53ceac1214c862261bd8ba875d06 Mon Sep 17 00:00:00 2001 From: Marijn Jansen Date: Mon, 30 Jan 2017 22:49:43 +0100 Subject: [PATCH 149/256] autocomplete suggestions at password --- website/views/settings-view.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/website/views/settings-view.php b/website/views/settings-view.php index 6271a45..c5c58c2 100644 --- a/website/views/settings-view.php +++ b/website/views/settings-view.php @@ -141,24 +141,30 @@ $settings = getSettings();
    Verander Wachtwoord
    • - +
    • - +
    • - +
    • -- 2.49.1 From 6983aa06a2c97646ff2f5fce9ebe4b03c18c8a33 Mon Sep 17 00:00:00 2001 From: Marijn Jansen Date: Mon, 30 Jan 2017 23:03:50 +0100 Subject: [PATCH 150/256] Finishing touches --- website/views/settings-view.php | 37 +++++++++++++++++---------------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/website/views/settings-view.php b/website/views/settings-view.php index c5c58c2..029a32b 100644 --- a/website/views/settings-view.php +++ b/website/views/settings-view.php @@ -21,7 +21,7 @@ $settings = getSettings(); id="fname" placeholder="Voornaam" title="Voornaam" - value="" + value="" >
    • @@ -30,7 +30,7 @@ $settings = getSettings(); name="lname" id="lname" placeholder="Achternaam" - value="" + value="" >
    • @@ -39,18 +39,19 @@ $settings = getSettings(); name="location" id="location" placeholder="Locatie" - value="" + value="" >
    • - + - -
    • @@ -83,7 +84,7 @@ $settings = getSettings(); + >
    • @@ -91,7 +92,7 @@ $settings = getSettings(); + >
    • @@ -100,7 +101,7 @@ $settings = getSettings(); rows="5" title="bio" id="bio" - > + >
    • @@ -116,7 +117,7 @@ $settings = getSettings();
      • - " + " class="profile-picture" >
      • @@ -183,7 +184,7 @@ $settings = getSettings(); " + value="" disabled > -- 2.49.1 From a6b6d6d747ca2a02e53f8bab68dcafda38ea5387 Mon Sep 17 00:00:00 2001 From: Marijn Jansen Date: Tue, 31 Jan 2017 10:23:47 +0100 Subject: [PATCH 151/256] Style changes --- website/views/settings-view.php | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/website/views/settings-view.php b/website/views/settings-view.php index 029a32b..b7f554a 100644 --- a/website/views/settings-view.php +++ b/website/views/settings-view.php @@ -4,13 +4,11 @@ $settings = getSettings();
        - - $alertMessage -
        "; - } - ?> + +
        + +
        +
        Profiel Instellingen
          @@ -43,10 +41,10 @@ $settings = getSettings(); >
        • - + +
        • -- 2.49.1 From 4dc3b4f651d353b266973acebaad5f517cb97826 Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Tue, 31 Jan 2017 10:31:57 +0100 Subject: [PATCH 152/256] Mobile friendly --- website/public/js/admin.js | 1 - website/public/js/friendButtons.js | 3 -- website/public/js/header.js | 46 ++++++++++++++--------- website/public/styles/chat.css | 14 ++++++- website/public/styles/header.css | 9 ++++- website/public/styles/main.css | 10 +++++ website/public/styles/menu.css | 14 +++++++ website/public/styles/mobilefriendly.css | 47 ++++++++++++++++++++++++ website/public/styles/profile.css | 2 +- website/views/head.php | 2 + website/views/menu.php | 2 +- 11 files changed, 125 insertions(+), 25 deletions(-) create mode 100644 website/public/styles/mobilefriendly.css diff --git a/website/public/js/admin.js b/website/public/js/admin.js index 140c99a..36347c2 100644 --- a/website/public/js/admin.js +++ b/website/public/js/admin.js @@ -60,7 +60,6 @@ function adminSearch() { "API/adminSearchUsers.php", $("#admin-searchform").serialize() ).done(function (data) { - console.log(data); $("#usertable").html(data); }) } diff --git a/website/public/js/friendButtons.js b/website/public/js/friendButtons.js index d62e919..47c476a 100644 --- a/website/public/js/friendButtons.js +++ b/website/public/js/friendButtons.js @@ -48,9 +48,6 @@ function placeFriendButtons() { text2 = "Weiger"; icon2 = "fa-times"; break; - default: - console.log(friendshipStatus); - break; } $buttonContainer.append( diff --git a/website/public/js/header.js b/website/public/js/header.js index bdf5fe3..13e3e12 100644 --- a/website/public/js/header.js +++ b/website/public/js/header.js @@ -1,25 +1,37 @@ $(document).ready(function() { // Toggle menu $("#own-profile-picture, #open-notifications").click(function() { - if ($("#notification-center").css('right') == "-256px") { - // Make the menu visible and move the content to the left. - $("#chat-history").width("calc(100% - 587px)"); - $(".modal").width("calc(100% - 512px)"); - $(".content").css("margin-right", "256px"); - $("#notification-center").css("right", "0px"); + if ($("#notification-center").css('display') == "none") { + // Make the menu visible and move the content to the left. + $(".modal").width("calc(100% - 512px)"); + $(".content").css("margin-right", "256px"); + $("#notification-center").css("right", "0px"); + $("#notification-center").css("display", "block"); + $("#contact-menu").css("display", "block"); - // Add cookie so the menu stays open on other pages - document.cookie = "menu=open; path=/"; - } else { - // Make the menu invisible and move the content to the right. - $("#chat-history").width("calc(100% - 331px)"); - $(".modal").width("calc(100% - 256px)"); - $(".content").css("margin-right", "0px"); - $("#notification-center").css("right", "-256px"); + // Add cookie so the menu stays open on other pages + if (window.innerWidth > 1080) { + $("#chat-history").width("calc(100% - 587px)"); + document.cookie = "menu=open; path=/"; + } else { + document.cookie = "menu=closed; path=/"; + } + } else { + $(".modal").width("calc(100% - 256px)"); + $(".content").css("margin-right", "0px"); + $("#notification-center").css("display", "none"); - // Change menu cookie to close - document.cookie = "menu=closed; path=/"; - } + if (window.innerWidth > 1080) { + $("#chat-history").width("calc(100% - 331px)"); + } else { + // Make the menu invisible and move the content to the right. + $("#contact-menu").css("display", "none"); + } + + // Change menu cookie to close + document.cookie = "menu=closed; path=/"; + + } }); if (getCookie("menu") == "open") { diff --git a/website/public/styles/chat.css b/website/public/styles/chat.css index 85eb219..cb0f19f 100644 --- a/website/public/styles/chat.css +++ b/website/public/styles/chat.css @@ -146,8 +146,20 @@ body { text-align: right; } -@media only screen and (max-width: 1200px) { +@media only screen and (max-width: 1080px) { .chat-message-self, .chat-message-other { max-width: 75%; } + .chat { + left: 0; + width: 100%; + } + #chat-recent-panel { + left: 0; + width: 320px; + } + #chat-history { + left: 50%; + width: calc(100% - 390px); + } } \ No newline at end of file diff --git a/website/public/styles/header.css b/website/public/styles/header.css index 70e8c80..61727eb 100644 --- a/website/public/styles/header.css +++ b/website/public/styles/header.css @@ -26,7 +26,8 @@ header { } #header-search { - padding-left: 42px; + margin: 24px 0 24px 32px; + vertical-align: middle; } @@ -49,4 +50,10 @@ header div { #open-notifications { padding: 5px 20px 5px 0px; +} + +@media only screen and (max-width: 1080px) { + #header-logo { + display: none; + } } \ No newline at end of file diff --git a/website/public/styles/main.css b/website/public/styles/main.css index abb1604..baff345 100644 --- a/website/public/styles/main.css +++ b/website/public/styles/main.css @@ -293,4 +293,14 @@ div[data-title]:hover:after { -webkit-border-radius: 20px; border-radius: 20px; background: #4CAF50; +} + +@media only screen and (max-width: 1080px) { + body { + font-size: 28px!important; + } + button { + font-size: 28px; + } + } \ No newline at end of file diff --git a/website/public/styles/menu.css b/website/public/styles/menu.css index 303b9bc..a862d12 100644 --- a/website/public/styles/menu.css +++ b/website/public/styles/menu.css @@ -86,4 +86,18 @@ height: 100%; padding: 0; text-align: left; +} + +@media only screen and (max-width: 1080px) { + #contact-menu, #notification-center { + display: none; + background: rgba(0, 0, 0, 0.4); + width: calc(50% - 20px); + } + .content { + margin-left: 0; + } + #quick-links i { + font-size: 48px!important; + } } \ No newline at end of file diff --git a/website/public/styles/mobilefriendly.css b/website/public/styles/mobilefriendly.css new file mode 100644 index 0000000..86ffab8 --- /dev/null +++ b/website/public/styles/mobilefriendly.css @@ -0,0 +1,47 @@ +/* MAIN */ +body { + font-size: 28px!important; +} +button { + font-size: 28px; +} + +/* HEADER */ +#header-logo { + display: none; +} + +/* PROFILE */ +.post-box { + width: calc(100% - 65px); +} + +/* MENU */ +#contact-menu, #notification-center { + display: none; + background: rgba(0, 0, 0, 0.4); + width: calc(50% - 20px); +} +.content { + margin-left: 0; +} +#quick-links i { + font-size: 48px!important; +} + +/* CHAT */ +.chat-message-self, .chat-message-other { + max-width: 75%; +} +.chat { + left: 0; + width: 100%; +} +#chat-recent-panel { + left: 0; + width: 320px; +} +#chat-history { + left: 50%; + width: calc(100% - 390px); +} \ No newline at end of file diff --git a/website/public/styles/profile.css b/website/public/styles/profile.css index 03ab19f..37aaaa1 100644 --- a/website/public/styles/profile.css +++ b/website/public/styles/profile.css @@ -116,7 +116,7 @@ div.posts .post form textarea.newpost { } /* mobile */ -@media only screen and (max-width: 1000px) { +@media only screen and (max-width: 1080px) { .post-box { width: calc(100% - 65px); } diff --git a/website/views/head.php b/website/views/head.php index eb86d56..6e8ca0a 100644 --- a/website/views/head.php +++ b/website/views/head.php @@ -12,6 +12,8 @@ @import url("styles/header.css"); @import url("styles/menu.css"); @import url("styles/footer.css"); + + @import url("styles/mobilefriendly.css") screen and (orientation: portrait); +
        -- 2.49.1 From f26097f55fab9a19fa2fc59b087aa4c813f84b5f Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Tue, 31 Jan 2017 12:25:28 +0100 Subject: [PATCH 155/256] Fixed online status --- website/public/bits/friend-item.php | 2 +- website/public/group.php | 2 +- website/public/profile.php | 8 ++++---- website/public/styles/main.css | 10 +++++++++- website/public/styles/profile.css | 2 +- website/queries/friendship.php | 11 ++++++----- website/queries/user.php | 13 +++++++++++++ website/views/head.php | 5 ++++- website/views/profile.php | 4 ++-- 9 files changed, 41 insertions(+), 16 deletions(-) diff --git a/website/public/bits/friend-item.php b/website/public/bits/friend-item.php index a69d12a..40bc8a8 100644 --- a/website/public/bits/friend-item.php +++ b/website/public/bits/friend-item.php @@ -33,7 +33,7 @@ foreach($friends as $i => $friend) { } ?>'>
        - PF + PF
        fullname ?>
        = DATE_SUB(NOW(),INTERVAL 15 MINUTE) + WHEN TRUE THEN 'online' + WHEN FALSE THEN 'offline' + END AS `onlinestatus`, `role` FROM `user` @@ -28,11 +32,8 @@ function selectLimitedFriends($userID, $limit) { `friendship`.`user1ID` = `user`.`userID`) AND `user`.`role` != 'banned' AND `friendship`.`status` = 'confirmed' - ORDER BY - CASE - WHEN `friendship`.`user2ID` = `user`.`userID` THEN `friendship`.`chatLastVisted1` - WHEN `friendship`.`user1ID` = `user`.`userID` THEN `friendship`.`chatLastVisted2` - END + ORDER BY + `user`.`lastactivity` DESC LIMIT :limitCount "); diff --git a/website/queries/user.php b/website/queries/user.php index 0900d9f..b1bb93c 100644 --- a/website/queries/user.php +++ b/website/queries/user.php @@ -2,6 +2,19 @@ require_once ("connect.php"); +function updateLastActivity() { + $stmt = prepareQuery(" + UPDATE + `user` + SET + `lastactivity` = NOW() + WHERE + `userID` = :userID + "); + $stmt->bindParam(":userID", $_SESSION["userID"]); + return $stmt->execute(); +} + function getUserID($username) { $stmt = prepareQuery(" SELECT diff --git a/website/views/head.php b/website/views/head.php index 6e8ca0a..284abb4 100644 --- a/website/views/head.php +++ b/website/views/head.php @@ -19,9 +19,12 @@ require_once ("../queries/checkInput.php"); require_once ("../queries/connect.php"); +require_once ("../queries/user.php"); session_start(); if(!isset($_SESSION["userID"])){ header("location:login.php"); -} \ No newline at end of file +} else { + updateLastActivity(); +} diff --git a/website/views/profile.php b/website/views/profile.php index 90a368d..8cf555f 100644 --- a/website/views/profile.php +++ b/website/views/profile.php @@ -1,10 +1,10 @@
        - ">
        + " src="">
        -- 2.49.1 From f67dd019c46c67ca604423d00ac04b7c956a8ac7 Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Tue, 31 Jan 2017 12:47:24 +0100 Subject: [PATCH 156/256] Inputs are now mobile friendly --- website/public/styles/main.css | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/website/public/styles/main.css b/website/public/styles/main.css index 7909687..f2d7535 100644 --- a/website/public/styles/main.css +++ b/website/public/styles/main.css @@ -192,7 +192,7 @@ button.green { } button.gray{ - background-color: inherit; + background-color: #FFF; color: #333; } @@ -307,8 +307,9 @@ div[data-title]:hover:after { body { font-size: 28px!important; } - button { + button, input { font-size: 28px; + height: 42px; } } \ No newline at end of file -- 2.49.1 From c14a2770bd092b41a343a2a99f0606c444c75b3d Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Tue, 31 Jan 2017 12:52:50 +0100 Subject: [PATCH 157/256] Fixed posting functions for groups. --- website/public/API/postPost.php | 57 +++++++++++++++++++++++++++------ website/queries/group_page.php | 31 +++++++++++++++++- 2 files changed, 77 insertions(+), 11 deletions(-) diff --git a/website/public/API/postPost.php b/website/public/API/postPost.php index b52e96b..40c18e1 100644 --- a/website/public/API/postPost.php +++ b/website/public/API/postPost.php @@ -2,16 +2,53 @@ session_start(); -require("../../queries/post.php"); -require("../../queries/connect.php"); -require("../../queries/checkInput.php"); +require_once("../../queries/post.php"); +require_once("../../queries/group_page.php"); +require_once("../../queries/connect.php"); +require_once("../../queries/checkInput.php"); -if (empty($_POST['newpost-title'])) { -} else { - makePost($_SESSION['userID'], - null, - test_input($_POST['newpost-title']), - test_input($_POST['newpost-content'])); +if (empty($_POST["title"]) or + empty($_POST["content"]) or + empty($_SESSION["userID"])) { + header('HTTP/1.1 500 Non enough arguments'); } -header("Location: ../profile.php"); \ No newline at end of file +if (empty($_POST["group"])) { + // User Post + makePost( + $_SESSION["userID"], + null, + test_input($_POST["title"]), + test_input($_POST["content"]) + ); +} else { + // Group Post + + // Check if the user is an admin or mod of the group. + if(!in_array(selectGroupRole($_POST["group"]), array('mod', 'admin'))) { + header('HTTP/1.1 500 Non enough rights'); + return; + } + + makePost( + $_SESSION["userID"], + $_POST["group"], + test_input($_POST["title"]), + test_input($_POST["content"]) + ); +} + + + + + + +//if (empty($_POST['newpost-title'])) { +//} else { +// makePost($_SESSION['userID'], +// null, +// test_input($_POST['newpost-title']), +// test_input($_POST['newpost-content'])); +//} +// +//header("Location: ../profile.php"); \ No newline at end of file diff --git a/website/queries/group_page.php b/website/queries/group_page.php index b3e454c..83911f8 100644 --- a/website/queries/group_page.php +++ b/website/queries/group_page.php @@ -11,6 +11,12 @@ function selectGroupByName($name) { `description`, `picture`, `status`, + ( + SELECT `role` + FROM `group_member` + WHERE `group_member`.`groupID` = `group_page`.`groupID` AND + `userID` = :userID + ) AS `role`, COUNT(`group_member`.`groupID`) as `members` FROM `group_page` @@ -22,13 +28,36 @@ function selectGroupByName($name) { name LIKE :name "); - $stmt->bindParam(':name', $name); + $stmt->bindParam(':name', $name, PDO::PARAM_STR); + $stmt->bindParam(':userID', $_SESSION["userID"], PDO::PARAM_INT); if (!$stmt->execute()) { return False; } return $stmt->fetch(); } +function selectGroupRole(int $groupID) { + $stmt = prepareQuery(" + SELECT + `role` + FROM + `group_member` + WHERE + `groupID` = :groupID AND + `userID` = :userID + "); + + $stmt->bindParam(':groupID', $groupID, PDO::PARAM_INT); + $stmt->bindParam(':userID', $_SESSION["userID"], PDO::PARAM_INT); + if(!$stmt->execute()) { + return False; + } + if($stmt->rowCount() == 0) { + return "none"; + } + return $stmt->fetch()["role"]; +} + function selectGroupMembers(int $groupID) { $stmt = prepareQuery(" SELECT -- 2.49.1 From 6b13db9c4fbfeb99ce903b8072c36ad2e60f7cc9 Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Tue, 31 Jan 2017 12:53:45 +0100 Subject: [PATCH 158/256] Fixed posting on group pages. --- website/public/API/postPost.php | 2 +- website/public/group.php | 3 +++ website/public/js/masonry.js | 34 +++++++++++++++++++++++++++++---- website/views/group.php | 2 +- 4 files changed, 35 insertions(+), 6 deletions(-) diff --git a/website/public/API/postPost.php b/website/public/API/postPost.php index 40c18e1..7a33857 100644 --- a/website/public/API/postPost.php +++ b/website/public/API/postPost.php @@ -29,7 +29,7 @@ if (empty($_POST["group"])) { header('HTTP/1.1 500 Non enough rights'); return; } - + makePost( $_SESSION["userID"], $_POST["group"], diff --git a/website/public/group.php b/website/public/group.php index 2ef3493..5d9459e 100644 --- a/website/public/group.php +++ b/website/public/group.php @@ -34,6 +34,9 @@ include("../views/group.php"); include("../views/footer.php"); $masonry_mode = 0; +if ($group["role"] == "mod" OR $group["role"] == "admin") { + $masonry_mode = 2; +} ?> diff --git a/website/public/js/masonry.js b/website/public/js/masonry.js index cb82089..d73c33c 100644 --- a/website/public/js/masonry.js +++ b/website/public/js/masonry.js @@ -23,6 +23,28 @@ function requestPost(postID) { }); } +function postPost() { + title = $("input.newpost[name='title']").val(); + content = $("textarea.newpost[name='content']").val(); + + if (masonryMode == 2) { + $.post("API/postPost.php", { title: title, + content : content, + group : groupID }) + .done(function() { + masonry(masonryMode); + }); + } else { + $.post("API/postPost.php", { title: title, + content : content }) + .done(function() { + masonry(masonryMode); + }); + } + + +} + $(window).on("load", function() { $(".modal-close").click(function () { $(".modal").hide(); @@ -64,13 +86,17 @@ function masonry(mode) { columns[i] = [0, $column]; } - if(mode == 1) { + if(mode > 0) { $postInput = $("
        "); - $form = $(""); + $form = $(""); $postInput.append($form); - $form.append($("")); - $form.append($("")); $form.append($("")); columns[0][1].append($postInput); diff --git a/website/views/post-view.php b/website/views/post-view.php index 264d67c..d961334 100644 --- a/website/views/post-view.php +++ b/website/views/post-view.php @@ -24,7 +24,7 @@ echo("
        -
        +
        +
        +
        + + + + + + + + + + + +
        \ No newline at end of file diff --git a/website/views/fbBdayInput.php b/website/views/fbBdayInput.php new file mode 100644 index 0000000..c08b192 --- /dev/null +++ b/website/views/fbBdayInput.php @@ -0,0 +1,40 @@ + + + + + + diff --git a/website/views/login-view.php b/website/views/login-view.php index 0219797..8e82fdf 100644 --- a/website/views/login-view.php +++ b/website/views/login-view.php @@ -20,7 +20,7 @@ name="user" value="" title="Moet een geldige gebruiker zijn" - > + required>
        @@ -31,7 +31,7 @@ placeholder="Voer uw wachtwoord in" name="psw" title="Moet minstens 8 karakters lang zijn" - > + required>
        @@ -47,73 +47,68 @@
        -
        - + + +login with Facebook!
        '; + } +?> \ No newline at end of file diff --git a/website/views/registerModal.php b/website/views/registerModal.php index b430ab8..9ad48dc 100644 --- a/website/views/registerModal.php +++ b/website/views/registerModal.php @@ -32,7 +32,8 @@ name="name" value="" title="Mag alleen letters bevatten" - > + required + autocomplete="given-name"> * @@ -44,7 +45,8 @@ name="surname" value="" title="Mag alleen letters bevatten" - > + required + autocomplete="family-name"> * @@ -65,7 +67,7 @@ name="username" value="" title="Moet minimaal 6 karakters bevatten" - > + required> *
        • Minstens 6 karakters
        • @@ -81,7 +83,7 @@ name="password" value="" id="password" - > + required> *
          • Minstens 8 karakters
          • @@ -96,7 +98,7 @@ value="" id="confirmpassword" title="Herhaal wachtwoord" - > + required> * @@ -109,7 +111,6 @@ value="" pattern="[A-Za-z]{1,}" title="Mag alleen letters bevatten"> - * @@ -120,7 +121,8 @@ name="email" value="" id="email" - title="Voer een geldige email in"> + title="Voer een geldige email in" + required> * @@ -132,10 +134,12 @@ name="confirmEmail" value="" id="email" - title="Herhaal uw email"> + title="Herhaal uw email" + required> * +
  • $username $role$bancomment +
    $bancomment
    +
    +
    + + + +
    +
    + +
    -- 2.49.1 From c0a64e9ffd4af652b488ac18a39f31831de13523 Mon Sep 17 00:00:00 2001 From: Marijn Jansen Date: Tue, 31 Jan 2017 16:19:15 +0100 Subject: [PATCH 172/256] 1337 bday --- website/views/settings-view.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/website/views/settings-view.php b/website/views/settings-view.php index b7f554a..b03133e 100644 --- a/website/views/settings-view.php +++ b/website/views/settings-view.php @@ -75,6 +75,9 @@ $settings = getSettings(); +
  • -- 2.49.1 From 52a4822477432218965aff2bf0b9b15018f4112e Mon Sep 17 00:00:00 2001 From: Hendrik Date: Tue, 31 Jan 2017 16:20:02 +0100 Subject: [PATCH 173/256] post-merge fix --- website/public/API/adminSearchUsers.php | 2 +- website/views/adminpanel-table.php | 2 +- website/views/adminpanel.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/website/public/API/adminSearchUsers.php b/website/public/API/adminSearchUsers.php index 58b170a..5f7944b 100644 --- a/website/public/API/adminSearchUsers.php +++ b/website/public/API/adminSearchUsers.php @@ -33,7 +33,7 @@ if (isset($_POST['groupstatus'])) { $groupstatus = $_POST["groupstatus"]; } -$userinfo = getRoleByID($_SESSION['userID'])->fetch(PDO::FETCH_ASSOC); +$userinfo = getRoleByID($_SESSION['userID']); if ($pagetype == "user") { include ("../../views/adminpanel-table.php"); diff --git a/website/views/adminpanel-table.php b/website/views/adminpanel-table.php index 9e6b9bc..3ae5da4 100644 --- a/website/views/adminpanel-table.php +++ b/website/views/adminpanel-table.php @@ -50,7 +50,7 @@ while($user = $q->fetch(PDO::FETCH_ASSOC)) { - + name="fbUserID" + value=""> + diff --git a/website/views/forgotPasswordModal.php b/website/views/forgotPasswordModal.php index d3f12f9..2ebdbb9 100644 --- a/website/views/forgotPasswordModal.php +++ b/website/views/forgotPasswordModal.php @@ -19,7 +19,8 @@ class="middle" placeholder="Voer uw email in" name="forgotEmail" - title="Voer een email in"> + title="Voer een email in" + required>
  • + value="email"> + Verander Email +
  • -- 2.49.1 From d027333bd7dfa3170505566a0f93c6b5ef55d6d9 Mon Sep 17 00:00:00 2001 From: Hendrik Date: Thu, 2 Feb 2017 01:06:31 +0100 Subject: [PATCH 196/256] fix filter and pagenumber interaction in search --- website/public/API/searchPageNumber.php | 14 ++++++++--- website/queries/friendship.php | 31 +++++++++++++++++++++++++ website/queries/group_member.php | 23 ++++++++++++++++++ website/views/search-view.php | 7 +++++- 4 files changed, 71 insertions(+), 4 deletions(-) diff --git a/website/public/API/searchPageNumber.php b/website/public/API/searchPageNumber.php index 4a76516..9a12d79 100644 --- a/website/public/API/searchPageNumber.php +++ b/website/public/API/searchPageNumber.php @@ -6,6 +6,8 @@ require_once ("../../queries/connect.php"); require_once ("../../queries/checkInput.php"); require_once ("../../queries/user.php"); require_once ("../../queries/group_page.php"); +require_once ("../../queries/friendship.php"); +require_once ("../../queries/group_member.php"); $user_perpage = $group_perpage = 20; @@ -25,14 +27,20 @@ if (isset($_POST['search'])) { $search = test_input($_POST['search']); } -$user_count = countSomeUsers($search)->fetchColumn(); -$group_count = countSomeGroups($search)->fetchColumn(); - $filter = "all"; if (isset($_POST['filter'])) { $filter = test_input($_POST['filter']); } +if ($filter == "all") { + $user_count = countSomeUsers($search)->fetchColumn(); + $group_count = countSomeGroups($search)->fetchColumn(); +} else { + $user_count = countSomeFriends($search); + $group_count = countSomeOwnGroups($search); +} + + $option = "user"; if (isset($_POST['option'])) { $option = test_input($_POST['option']); diff --git a/website/queries/friendship.php b/website/queries/friendship.php index 450fd20..49d8047 100644 --- a/website/queries/friendship.php +++ b/website/queries/friendship.php @@ -274,4 +274,35 @@ function searchSomeFriends($n, $m, $search) { $stmt->bindParam(':m', $m, PDO::PARAM_INT); $stmt->execute(); return json_encode($stmt->fetchAll()); +} + +function countSomeFriends($search) { + $stmt = prepareQuery(" + SELECT + COUNT(*) + FROM + `user` + INNER JOIN + `friendship` + WHERE + ((`friendship`.`user1ID` = :userID AND + `friendship`.`user2ID` = `user`.`userID` OR + `friendship`.`user2ID` = :userID AND + `friendship`.`user1ID` = `user`.`userID`) AND + `user`.`role` != 'banned' AND + `friendship`.`status` = 'confirmed') AND + (`username` LIKE :keyword OR + `fname` LIKE :keyword OR + `lname` LIKE :keyword) + ORDER BY + `fname`, + `lname`, + `username` + "); + + $search = "%$search%"; + $stmt->bindParam(':keyword', $search); + $stmt->bindParam(':userID', $_SESSION["userID"], PDO::PARAM_INT); + $stmt->execute(); + return $stmt->fetchColumn(); } \ No newline at end of file diff --git a/website/queries/group_member.php b/website/queries/group_member.php index cea4dde..8b6bf75 100644 --- a/website/queries/group_member.php +++ b/website/queries/group_member.php @@ -54,3 +54,26 @@ function searchSomeOwnGroups($n, $m, $search) { return json_encode($stmt->fetchAll()); } + +function countSomeOwnGroups($search) { + $stmt = prepareQuery(" + SELECT + COUNT(*) + FROM + `group_page` + INNER JOIN + `group_member` + WHERE + `group_member`.`userID` = :userID AND + `group_member`.`groupID` = `group_page`.`groupID` AND + `group_page`.`status` != 'hidden' AND + `name` LIKE :keyword + "); + + $search = "%$search%"; + $stmt->bindParam(':keyword', $search); + $stmt->bindParam(':userID', $_SESSION["userID"], PDO::PARAM_INT); + $stmt->execute(); + + return $stmt->fetchColumn(); +} \ No newline at end of file diff --git a/website/views/search-view.php b/website/views/search-view.php index e42f985..f00fd3c 100644 --- a/website/views/search-view.php +++ b/website/views/search-view.php @@ -48,7 +48,12 @@ $group_n = ($group_currentpage - 1) * $group_perpage; - -- 2.49.1 From e299ef59e8e5e46d87fde39c1b152b34aa92807a Mon Sep 17 00:00:00 2001 From: Marijn Jansen Date: Thu, 2 Feb 2017 10:28:12 +0100 Subject: [PATCH 197/256] Added show profile into settings --- website/public/js/post.js | 2 -- website/queries/settings.php | 7 +++++-- website/views/settings-view.php | 8 ++++++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/website/public/js/post.js b/website/public/js/post.js index f176950..4009023 100644 --- a/website/public/js/post.js +++ b/website/public/js/post.js @@ -34,6 +34,4 @@ function deletePost(postID) { }); closeModal(); masonry(masonryMode); - - } \ No newline at end of file diff --git a/website/queries/settings.php b/website/queries/settings.php index 03f794f..dfd65a0 100644 --- a/website/queries/settings.php +++ b/website/queries/settings.php @@ -18,7 +18,8 @@ function getSettings() { `bio`, `profilepicture`, `showBday`, - `showEmail` + `showEmail`, + `showProfile` FROM `user` WHERE @@ -64,7 +65,8 @@ function updateSettings() { `birthdate` = :bday, `bio` = :bio, `showEmail` = :showEmail, - `showBday` = :showBday + `showBday` = :showBday, + `showProfile` = :showProfile WHERE `userID` = :userID "); @@ -79,6 +81,7 @@ function updateSettings() { $stmt->bindValue(":bio", test_input($_POST["bio"])); $stmt->bindValue(":showEmail", (array_key_exists("showEmail", $_POST) ? "1" : "0")); $stmt->bindValue(":showBday", (array_key_exists("showBday", $_POST) ? "1" : "0")); + $stmt->bindValue(":showProfile", (array_key_exists("showProfile", $_POST) ? "1" : "0")); $stmt->bindValue(":userID", $_SESSION["userID"]); $stmt->execute(); diff --git a/website/views/settings-view.php b/website/views/settings-view.php index e3cfd36..f72e243 100644 --- a/website/views/settings-view.php +++ b/website/views/settings-view.php @@ -96,6 +96,14 @@ $settings = getSettings(); > +
  • + + + > +
  • ")); - $form.append($("")); + $form.append($("")); columns[0][1].append($postInput); columns[0][0] = $postInput.height() + margin; diff --git a/website/public/styles/profile.css b/website/public/styles/profile.css index 1bacafa..2370da8 100644 --- a/website/public/styles/profile.css +++ b/website/public/styles/profile.css @@ -108,7 +108,7 @@ div.posts .post form input, div.posts .post form textarea { width: calc(100% - 15px); } -div.posts .post form input[type="submit"] { +div.posts .post form input[type="submit"], .post button{ width: 100%; } diff --git a/website/views/post-view.php b/website/views/post-view.php index da1c86f..f8fe902 100644 --- a/website/views/post-view.php +++ b/website/views/post-view.php @@ -30,7 +30,7 @@ $fullname = $post['fname'] . " " . $post['lname'] . " (" . $post['username'] . "

    - + "; + ""; } // Add ogg video's else if (link.match(/(https?:\/\/.[^ ]*\.(?:ogg))/ig)) { return ""; + ""; } // Add youtube video's else if (link.match(/(https?:\/\/.(www.)?youtube|youtu.be)*watch/ig)) { diff --git a/website/public/styles/main.css b/website/public/styles/main.css index 226a96d..650a30f 100644 --- a/website/public/styles/main.css +++ b/website/public/styles/main.css @@ -116,7 +116,7 @@ p { @media only screen and (max-width: 1400px) { .item-box { - width: calc(100% - 50px); + width: calc(100% - 50px)!important; } } diff --git a/website/public/styles/settings.css b/website/public/styles/settings.css index 933e7fd..6a2c2f2 100644 --- a/website/public/styles/settings.css +++ b/website/public/styles/settings.css @@ -32,6 +32,11 @@ text-align: right; } +.settings-password, .settings-email { + width: calc(50% - 60px); + display: inline-flex; +} + .settings-password label, .settings-email label { text-align: left; } diff --git a/website/views/head.php b/website/views/head.php index 284abb4..c4d13a5 100644 --- a/website/views/head.php +++ b/website/views/head.php @@ -1,4 +1,8 @@ - + + + + + MyHyvesbook+ -- 2.49.1 From 327a6a8f5cb5f8ca04508548dd3f6d3062e5264d Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Thu, 2 Feb 2017 12:52:03 +0100 Subject: [PATCH 202/256] BUG FIX: username doesn't cut off in link --- website/public/bits/friend-item.php | 2 +- website/queries/friendship.php | 13 ++++++++----- website/queries/user.php | 3 ++- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/website/public/bits/friend-item.php b/website/public/bits/friend-item.php index 181f9b6..6a0c868 100644 --- a/website/public/bits/friend-item.php +++ b/website/public/bits/friend-item.php @@ -41,7 +41,7 @@ foreach($friends as $i => $friend) { fullname ?>
    username)) { - echo $friend->username; + echo $friend->usernameshort; } else if (isset($friend->content)) { echo $friend->content; } diff --git a/website/queries/friendship.php b/website/queries/friendship.php index e1a8c53..6ea6313 100644 --- a/website/queries/friendship.php +++ b/website/queries/friendship.php @@ -10,7 +10,8 @@ function selectLimitedFriends($userID, $limit) { $stmt = prepareQuery(" SELECT `userID`, - LEFT(`username`, 12) as `username`, + LEFT(`username`, 12) as `usernameshort`, + `username`, LEFT(CONCAT(`user`.`fname`, ' ', `user`.`lname`), 12) as `fullname`, IFNULL( `profilepicture`, @@ -50,7 +51,8 @@ function selectAllFriends($userID) { $stmt = prepareQuery(" SELECT `userID`, - LEFT(`username`, 12) as `username`, + LEFT(`username`, 12) as `usernameshort`, + `username`, LEFT(CONCAT(`user`.`fname`, ' ', `user`.`lname`), 12) as `fullname`, IFNULL( `profilepicture`, @@ -85,7 +87,8 @@ function selectAllFriendRequests() { $stmt = prepareQuery(" SELECT `userID`, - LEFT(`username`, 12) as `username`, + LEFT(`username`, 12) as `usernameshort`, + `username`, LEFT(CONCAT(`user`.`fname`, ' ', `user`.`lname`), 12) as `fullname`, IFNULL( `profilepicture`, @@ -235,8 +238,8 @@ function searchSomeFriends($n, $m, $search) { $stmt = prepareQuery(" SELECT `userID`, - - LEFT(`username`, 12) as `username`, + LEFT(`username`, 12) as `usernameshort`, + `username`, LEFT(CONCAT(`user`.`fname`, ' ', `user`.`lname`), 12) as `fullname`, IFNULL( `profilepicture`, diff --git a/website/queries/user.php b/website/queries/user.php index 72205ba..1e54763 100644 --- a/website/queries/user.php +++ b/website/queries/user.php @@ -349,7 +349,8 @@ function searchSomeUsers($n, $m, $search) { $stmt = prepareQuery(" SELECT `userID`, - LEFT(`username`, 12) as `username`, + LEFT(`username`, 12) as `usernameshort`, + `username`, IFNULL( `profilepicture`, '../img/avatar-standard.png' -- 2.49.1 From 86b02973e4887022619cff121379f9fd5da50998 Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Thu, 2 Feb 2017 13:02:00 +0100 Subject: [PATCH 203/256] Fixed visibility on profiles --- website/public/profile.php | 6 ++++++ website/queries/user.php | 4 ++++ website/views/profile.php | 7 +++++-- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/website/public/profile.php b/website/public/profile.php index 05c661d..d9a317c 100644 --- a/website/public/profile.php +++ b/website/public/profile.php @@ -21,13 +21,19 @@ include_once("../queries/calcAge.php"); if(empty($_GET["username"])) { $userID = $_SESSION["userID"]; + $showProfile = True; } else { $userID = getUserID($_GET["username"]); + $showProfile = False; } $user = selectUser($_SESSION["userID"], $userID); $profile_friends = selectAllFriends($userID); $profile_groups = selectAllUserGroups($userID); +$showProfile = $showProfile || $user["showProfile"] || ($user["status"] == 'confirmed'); +echo " friendship status: " . $user["status"]; +echo " showprofile: $showProfile"; +echo " userID: " . $user["userID"]; if ($userID == $_SESSION["userID"]) { diff --git a/website/queries/user.php b/website/queries/user.php index 33a85a1..74b0aa1 100644 --- a/website/queries/user.php +++ b/website/queries/user.php @@ -65,6 +65,10 @@ function selectUser($me, $other) { `role`, `fname`, `lname`, + `showBday`, + `showEmail`, + `showProfile`, + `status`, CASE `status` IS NULL WHEN TRUE THEN 0 WHEN FALSE THEN diff --git a/website/views/profile.php b/website/views/profile.php index 2bb117f..1e88af8 100644 --- a/website/views/profile.php +++ b/website/views/profile.php @@ -15,16 +15,18 @@

    - " . $user["bio"] . "

    "; } ?>
    - 50) { + 50 and $showProfile) { echo "

    Bio:

    " . $user["bio"] . "

    "; } ?> +

    Informatie

    @@ -85,4 +87,5 @@

    + \ No newline at end of file -- 2.49.1 From 9d675dd897b01d2a5e4e13a124ab9944b2b63a46 Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Thu, 2 Feb 2017 13:11:05 +0100 Subject: [PATCH 204/256] Fixed default image for group members. --- website/queries/group_page.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/website/queries/group_page.php b/website/queries/group_page.php index 511ff4d..b66ca54 100644 --- a/website/queries/group_page.php +++ b/website/queries/group_page.php @@ -81,7 +81,10 @@ function selectGroupMembers(int $groupID) { `username`, `fname`, `lname`, - `profilepicture` + IFNULL( + `profilepicture`, + '../img/avatar-standard.png' + ) AS profilepicture FROM `group_member` LEFT JOIN -- 2.49.1 From 044ed6a9d34345e54778ef1795611a51402521c1 Mon Sep 17 00:00:00 2001 From: Joey Lai Date: Thu, 2 Feb 2017 13:19:39 +0100 Subject: [PATCH 205/256] Added noscript --- website/public/styles/index.css | 8 +++++++- website/queries/checkInput.php | 2 +- website/views/facebookRegisterModal.php | 3 +-- website/views/login-view.php | 7 +++++++ 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/website/public/styles/index.css b/website/public/styles/index.css index 196485e..c7a0aa8 100644 --- a/website/public/styles/index.css +++ b/website/public/styles/index.css @@ -133,6 +133,12 @@ label { color: red; } +.login_containerNoscript { + padding: 4px; + text-align: center; + color: red; +} + @keyframes animatezoom { from {transform: scale(0)} to {transform: scale(1)} @@ -150,7 +156,7 @@ label { margin: 16px auto; overflow-y: auto; padding: 20px; - width: 600px; + width: 650px; } select{ diff --git a/website/queries/checkInput.php b/website/queries/checkInput.php index 8722418..69274ce 100644 --- a/website/queries/checkInput.php +++ b/website/queries/checkInput.php @@ -132,7 +132,7 @@ function validateFBEmail($variable){ } else if (!filter_var($variable, FILTER_VALIDATE_EMAIL)) { throw new emailException("Geldige email invullen"); } else if (getExistingFBEmail() == 1){ - throw new emailException("Email bestaal al!"); + throw new emailException("Uw email wordt al gebruikt voor een ander account!"); } else if (strlen($variable) > 255) { throw new emailException("Mag maximaal 50 karakters!"); } diff --git a/website/views/facebookRegisterModal.php b/website/views/facebookRegisterModal.php index 7db44b0..7271d63 100644 --- a/website/views/facebookRegisterModal.php +++ b/website/views/facebookRegisterModal.php @@ -55,7 +55,6 @@ * - + * - diff --git a/website/views/login-view.php b/website/views/login-view.php index 4f85b0a..98ce71c 100644 --- a/website/views/login-view.php +++ b/website/views/login-view.php @@ -1,3 +1,9 @@ +
    -- 2.49.1 From 417124a1fed22f85cd86615e83df488455baeb30 Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Thu, 2 Feb 2017 14:13:20 +0100 Subject: [PATCH 210/256] BUG FIX: added 0 in chat time if needed --- website/public/js/chat.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/public/js/chat.js b/website/public/js/chat.js index 1141334..a3ff430 100644 --- a/website/public/js/chat.js +++ b/website/public/js/chat.js @@ -59,7 +59,7 @@ function addMessages(messages) { for(var i in messages) { // Initialize message variables. var thisDate = new Date(messages[i].creationdate.replace(/ /,"T")); - var thisTime = thisDate.getHours() + ":" + thisDate.getMinutes(); + var thisTime = thisDate.getHours() + ":" + ('0' + thisDate.getMinutes()).slice(-2); var type; thisDate.setHours(0,0,0,0); @@ -81,6 +81,8 @@ function addMessages(messages) {
    '; } previousDate = thisDate; + previousTime = thisTime; + previousType = type; messagesText += '
    '; // If it is not the first message, and has a different date/time/type then the previous message, } else if (type != previousType || thisTime != previousTime || thisDate.getTime() > previousDate.getTime()) { -- 2.49.1 From 4a7a91ecd964f1cb0827765078314d04ac6534dc Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Thu, 2 Feb 2017 14:20:17 +0100 Subject: [PATCH 211/256] Fixed bug (not showing profile when on own profile) --- website/public/profile.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/website/public/profile.php b/website/public/profile.php index d9a317c..aa4cf7c 100644 --- a/website/public/profile.php +++ b/website/public/profile.php @@ -21,19 +21,14 @@ include_once("../queries/calcAge.php"); if(empty($_GET["username"])) { $userID = $_SESSION["userID"]; - $showProfile = True; } else { $userID = getUserID($_GET["username"]); - $showProfile = False; } $user = selectUser($_SESSION["userID"], $userID); $profile_friends = selectAllFriends($userID); $profile_groups = selectAllUserGroups($userID); -$showProfile = $showProfile || $user["showProfile"] || ($user["status"] == 'confirmed'); -echo " friendship status: " . $user["status"]; -echo " showprofile: $showProfile"; -echo " userID: " . $user["userID"]; +$showProfile = $user["showProfile"] || ($user["status"] == 'confirmed') || $_SESSION["userID"] == $userID; if ($userID == $_SESSION["userID"]) { -- 2.49.1 From 188741ddf5ded574767a0115f06af8bd2a97487b Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Thu, 2 Feb 2017 14:22:13 +0100 Subject: [PATCH 212/256] BUG FIX: link in fancy text now opens in new tab --- website/public/js/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/public/js/main.js b/website/public/js/main.js index b6ab703..30cd3ed 100644 --- a/website/public/js/main.js +++ b/website/public/js/main.js @@ -31,7 +31,7 @@ function fancyText(text) { } // Add links else { - return "" + link + ""; + return "" + link + ""; } }); -- 2.49.1 From 1672ce6086deed96f1325a3044e9fe9c632adaf6 Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Thu, 2 Feb 2017 14:23:36 +0100 Subject: [PATCH 213/256] Changed offline status to 5 minutes after inactive --- website/queries/friendship.php | 8 ++++---- website/queries/user.php | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/website/queries/friendship.php b/website/queries/friendship.php index 7edada9..3dcd53b 100644 --- a/website/queries/friendship.php +++ b/website/queries/friendship.php @@ -17,7 +17,7 @@ function selectLimitedFriends($userID, $limit) { `profilepicture`, '../img/avatar-standard.png' ) AS profilepicture, - CASE `lastactivity` >= DATE_SUB(NOW(),INTERVAL 15 MINUTE) + CASE `lastactivity` >= DATE_SUB(NOW(),INTERVAL 5 MINUTE) WHEN TRUE THEN 'online' WHEN FALSE THEN 'offline' END AS `onlinestatus`, @@ -58,7 +58,7 @@ function selectAllFriends($userID) { `profilepicture`, '../img/avatar-standard.png' ) AS profilepicture, - CASE `lastactivity` >= DATE_SUB(NOW(),INTERVAL 15 MINUTE) + CASE `lastactivity` >= DATE_SUB(NOW(),INTERVAL 5 MINUTE) WHEN TRUE THEN 'online' WHEN FALSE THEN 'offline' END AS `onlinestatus`, @@ -94,7 +94,7 @@ function selectAllFriendRequests() { `profilepicture`, '../img/avatar-standard.png' ) AS profilepicture, - CASE `lastactivity` >= DATE_SUB(NOW(),INTERVAL 15 MINUTE) + CASE `lastactivity` >= DATE_SUB(NOW(),INTERVAL 5 MINUTE) WHEN TRUE THEN 'online' WHEN FALSE THEN 'offline' END AS `onlinestatus`, @@ -245,7 +245,7 @@ function searchSomeFriends($n, $m, $search) { `profilepicture`, '../img/avatar-standard.png' ) AS profilepicture, - CASE `lastactivity` >= DATE_SUB(NOW(),INTERVAL 15 MINUTE) + CASE `lastactivity` >= DATE_SUB(NOW(),INTERVAL 5 MINUTE) WHEN TRUE THEN 'online' WHEN FALSE THEN 'offline' END AS `onlinestatus`, diff --git a/website/queries/user.php b/website/queries/user.php index e8bda13..7b8ef3f 100644 --- a/website/queries/user.php +++ b/website/queries/user.php @@ -62,7 +62,7 @@ function selectUser($me, $other) { ) AS profilepicture, `bio`, `user`.`creationdate`, - CASE `lastactivity` >= DATE_SUB(NOW(),INTERVAL 15 MINUTE) + CASE `lastactivity` >= DATE_SUB(NOW(),INTERVAL 5 MINUTE) WHEN TRUE THEN 'online' WHEN FALSE THEN 'offline' END AS `onlinestatus`, @@ -131,7 +131,7 @@ function select20UsersFromN($n) { `username`, `role`, `bancomment`, - CASE `lastactivity` >= DATE_SUB(NOW(),INTERVAL 15 MINUTE) + CASE `lastactivity` >= DATE_SUB(NOW(),INTERVAL 5 MINUTE) WHEN TRUE THEN 'online' WHEN FALSE THEN 'offline' END AS `onlinestatus` @@ -156,7 +156,7 @@ function search20UsersFromN($n, $keyword) { `username`, `role`, `bancomment`, - CASE `lastactivity` >= DATE_SUB(NOW(),INTERVAL 15 MINUTE) + CASE `lastactivity` >= DATE_SUB(NOW(),INTERVAL 5 MINUTE) WHEN TRUE THEN 'online' WHEN FALSE THEN 'offline' END AS `onlinestatus` @@ -184,7 +184,7 @@ function search20UsersFromNByStatus($n, $keyword, $status) { `username`, `role`, `bancomment`, - CASE `lastactivity` >= DATE_SUB(NOW(),INTERVAL 15 MINUTE) + CASE `lastactivity` >= DATE_SUB(NOW(),INTERVAL 5 MINUTE) WHEN TRUE THEN 'online' WHEN FALSE THEN 'offline' END AS `onlinestatus` @@ -218,7 +218,7 @@ function searchSomeUsersByStatus($n, $m, $search, $status) { `username`, `role`, `bancomment`, - CASE `lastactivity` >= DATE_SUB(NOW(),INTERVAL 15 MINUTE) + CASE `lastactivity` >= DATE_SUB(NOW(),INTERVAL 5 MINUTE) WHEN TRUE THEN 'online' WHEN FALSE THEN 'offline' END AS `onlinestatus` @@ -362,7 +362,7 @@ function searchSomeUsers($n, $m, $search) { '../img/avatar-standard.png' ) AS profilepicture, LEFT(CONCAT(`user`.`fname`, ' ', `user`.`lname`), 12) as `fullname`, - CASE `lastactivity` >= DATE_SUB(NOW(),INTERVAL 15 MINUTE) + CASE `lastactivity` >= DATE_SUB(NOW(),INTERVAL 5 MINUTE) WHEN TRUE THEN 'online' WHEN FALSE THEN 'offline' END AS `onlinestatus` -- 2.49.1 From 6fc2f715176a34529d129a0f1a79d4d57f9ae659 Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Thu, 2 Feb 2017 14:27:23 +0100 Subject: [PATCH 214/256] Added meta data in the login page --- website/views/login_head.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/website/views/login_head.php b/website/views/login_head.php index e319a9d..bb7d7cf 100644 --- a/website/views/login_head.php +++ b/website/views/login_head.php @@ -1,5 +1,8 @@ - + + + + MyHyvesbook+ Date: Thu, 2 Feb 2017 14:50:51 +0100 Subject: [PATCH 215/256] Added "add group" under group menu --- website/views/menu.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/views/menu.php b/website/views/menu.php index dab8fce..1c1cf01 100644 --- a/website/views/menu.php +++ b/website/views/menu.php @@ -12,6 +12,8 @@ + +
  • GebruikersnaamGroepsnaam StatusAantekeningBeschrijving Actie