From c4d78e54bc719f42c4f1e25329bb288bf9524cf1 Mon Sep 17 00:00:00 2001 From: Hendrik Date: Thu, 19 Jan 2017 11:08:45 +0100 Subject: [PATCH 01/50] 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"> -
-            
         
From b37d06e2cc0a67d8819773fdf1ba9a56d3884375 Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Thu, 19 Jan 2017 11:55:23 +0100 Subject: [PATCH 02/50] Updated queries --- website/queries/friendship.php | 5 +++-- website/queries/user.php | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/website/queries/friendship.php b/website/queries/friendship.php index 14fa6ee..a3a2fb8 100644 --- a/website/queries/friendship.php +++ b/website/queries/friendship.php @@ -2,12 +2,12 @@ require("connect.php"); function selectAllFriends($db, $userID) { - $stmt = $db->prepare(" + $stmt = $GLOBALS["db"]->prepare(" SELECT `username`, IFNULL( `profilepicture`, - 'img/notbad.png' + '../img/notbad.jpg' ) AS profilepicture, `onlinestatus`, `role` @@ -26,5 +26,6 @@ function selectAllFriends($db, $userID) { $stmt->bindParam(':userID', $userID, 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 659e0d6..de76ff7 100644 --- a/website/queries/user.php +++ b/website/queries/user.php @@ -22,7 +22,7 @@ function selectUser($db, $userID) { `username`, IFNULL( `profilepicture`, - 'img/notbad.png' + '../img/notbad.jpg' ) AS profilepicture, `bio`, `role`, @@ -42,7 +42,7 @@ function selectUser($db, $userID) { } function selectAllUserGroups($db, $userID) { - $stmt = $db->prepare(" + $stmt = $GLOBALS["db"]->prepare(" SELECT `group_page`.`groupID`, `name`, @@ -65,7 +65,7 @@ function selectAllUserGroups($db, $userID) { } function selectAllUserPosts($db, $userID) { - $stmt = $db->prepare(" + $stmt = $GLOBALS["db"]->prepare(" SELECT `postID`, `author`, From 84719529bb091c26193c9ddc49a7fecdeb81d718 Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Thu, 19 Jan 2017 12:01:39 +0100 Subject: [PATCH 03/50] Fixed queries and profile page. --- website/public/profile.php | 10 +++++----- website/queries/friendship.php | 2 +- website/queries/user.php | 12 ++++++------ website/views/menu.php | 2 +- website/views/profile.php | 12 +++++++----- 5 files changed, 20 insertions(+), 18 deletions(-) diff --git a/website/public/profile.php b/website/public/profile.php index 4854080..e35935b 100644 --- a/website/public/profile.php +++ b/website/public/profile.php @@ -46,12 +46,12 @@ if(empty($_GET["username"])) { return; } -$userID = getUserID($db, $_GET["username"]); +$userID = getUserID($_GET["username"]); -$user = selectUser($db, $userID); -$friends = selectAllFriends($db, $userID); -$groups = selectAllUserGroups($db, $userID); -$posts = selectAllUserPosts($db, $userID); +$user = selectUser($userID); +$profile_friends = selectAllFriends($userID); +$profile_groups = selectAllUserGroups($userID); +$posts = selectAllUserPosts($userID); ?> diff --git a/website/queries/friendship.php b/website/queries/friendship.php index a3a2fb8..f13fed5 100644 --- a/website/queries/friendship.php +++ b/website/queries/friendship.php @@ -1,7 +1,7 @@ prepare(" SELECT `username`, diff --git a/website/queries/user.php b/website/queries/user.php index de76ff7..c6e691a 100644 --- a/website/queries/user.php +++ b/website/queries/user.php @@ -1,8 +1,8 @@ prepare(" +function getUserID($username) { + $stmt = $GLOBALS["db"]->prepare(" SELECT `userID` FROM @@ -16,8 +16,8 @@ function getUserID($db, $username) { return $stmt->fetch()["userID"]; } -function selectUser($db, $userID) { - $stmt = $db->prepare(" +function selectUser($userID) { + $stmt = $GLOBALS["db"]->prepare(" SELECT `username`, IFNULL( @@ -41,7 +41,7 @@ function selectUser($db, $userID) { return $stmt->fetch(); } -function selectAllUserGroups($db, $userID) { +function selectAllUserGroups($userID) { $stmt = $GLOBALS["db"]->prepare(" SELECT `group_page`.`groupID`, @@ -64,7 +64,7 @@ function selectAllUserGroups($db, $userID) { return $stmt; } -function selectAllUserPosts($db, $userID) { +function selectAllUserPosts($userID) { $stmt = $GLOBALS["db"]->prepare(" SELECT `postID`, diff --git a/website/views/menu.php b/website/views/menu.php index 731b284..83ebfc0 100644 --- a/website/views/menu.php +++ b/website/views/menu.php @@ -13,7 +13,7 @@ $_SESSION["userID"] = 2; // Get all the friends of a user. - $friends = selectAllFriends($db, $_SESSION["userID"]); + $friends = selectAllFriends($_SESSION["userID"]); $i = 0; // Print all the users. diff --git a/website/views/profile.php b/website/views/profile.php index 395dd15..6c273a6 100644 --- a/website/views/profile.php +++ b/website/views/profile.php @@ -4,18 +4,19 @@

Als vriend toevoegen

-

-

+

()

+

Vrienden

fetch()) { - echo "" . $friend["username"] . ""; + while($friend = $profile_friends->fetch()) { + echo "${friend["username"]}"; } + if($friends->rowCount() === 0) { echo "

Deze gebruiker heeft nog geen vrienden gemaakt.

"; } @@ -27,7 +28,7 @@

Groepen

fetch()) { + while($group = $profile_groups->fetch()) { echo "${group["name"]}s logo"; } @@ -51,4 +52,5 @@ "; } ?> +

\ No newline at end of file From 4c9223cba2b2f7bb835d64e3b1dd5078d22267a8 Mon Sep 17 00:00:00 2001 From: Hendrik Date: Thu, 19 Jan 2017 12:57:10 +0100 Subject: [PATCH 04/50] 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) {
+            
         
From f5fa36c09c60fc6fdd0df326448323a3c33b3277 Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Thu, 19 Jan 2017 14:55:58 +0100 Subject: [PATCH 05/50] added 404 image --- website/public/img/error404.jpg | Bin 0 -> 33719 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 website/public/img/error404.jpg diff --git a/website/public/img/error404.jpg b/website/public/img/error404.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f6a259aaf0ae70f4097224569b38139b09e6124f GIT binary patch literal 33719 zcmcG#1yCJ9^DlaEcXxMpmjr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W-RqPV$7+*GhTG<P+f0GpZt+#Haof4V zv8LnWn!lH0)+dbJXe=oHlP8QZ$Qhs~_FnnGJq83%XFAvDWro}x7U!8EeJ(22wudW9e79uwBDJqJ-- zKQw)go6%#mRsZA-bjU7s%7BDNKx*CwhxgsML9 z?1+MnoWIQ{bDZlClYl8op^fO+(jech{n=$U4;LYyVtwkIpI)am^r3Mm&{L#5z*?9n zqIECIoiciB(^4$Q#YS9T+AY~?DqW?kE6Mk8(y43oM^6D&K@IU#LQT?X`t8~->-q|U zEhMf#v!qA|yhEYhPl0qnuiP#NS`qehxFh^v%2bkrXm&{m?)Sa*HEQTLy`qn*@MW0OGNn;`F7U0Kpn8`0p{^@^5IFR26FKByjjf%8pWh%4YV( zFhW?1Lm0+|Q>+R0@wj6djq>6`nNlcx;<4kVB2&S~slx=R_=gl`LJMM#TbqBkdifD^ zid|V}CB`@3FIX7Zufa{eJWCqrI>a~>Yq!T|gFh=SXoFGvg;s2LIv^82nOp^6DKP=X zszBc$1Qn;*+61WrVA>nC`Z&;$gSssQ8-#~Yy>vKq7yZzr+MnZ^L$Ud_dUS$L8uhB) zLMikEzjIShP8ss{$OR^i5|uTZ!AS}2!JLNWgN{M!7yeNMnq9hj&YH$F?Y_oQ0YcJx zU4$D}!Ile^yarWp4@=*T6&Z>s`6E=45-HD*BmwA~A=PI5EPpU4(@JRo^2lWjv%)SI z`W<;}0GP6zNPMuC+a|auvNTjpHVDJQG5{FJdHjhlu|3i6^_Y z&f$>;`V>vh722fwroGEb*YJ;WAp#absI1kZm=xsd* Date: Thu, 19 Jan 2017 15:50:57 +0100 Subject: [PATCH 06/50] added .htaccess --- website/.htaccess | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 website/.htaccess diff --git a/website/.htaccess b/website/.htaccess new file mode 100644 index 0000000..5c0147b --- /dev/null +++ b/website/.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 From 64ea5d3f68c70a51153d8288d127ebd5cacf004e Mon Sep 17 00:00:00 2001 From: Joey Lai Date: Thu, 19 Jan 2017 15:55:28 +0100 Subject: [PATCH 07/50] Functions with validating --- website/mysql_config.xml | 7 -- website/public/login.php | 8 +-- website/public/register.php | 124 +++----------------------------- website/queries/checkInput.php | 95 ++++++++++++++++++++++++ website/views/login-view.php | 2 +- website/views/register-view.php | 4 +- 6 files changed, 113 insertions(+), 127 deletions(-) delete mode 100644 website/mysql_config.xml create mode 100644 website/queries/checkInput.php diff --git a/website/mysql_config.xml b/website/mysql_config.xml deleted file mode 100644 index de2d929..0000000 --- a/website/mysql_config.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - localhost - myhyvesbookplus - mhbp - qdtboXhCHJyL2szC - \ No newline at end of file diff --git a/website/public/login.php b/website/public/login.php index f889f2f..d8eb62a 100644 --- a/website/public/login.php +++ b/website/public/login.php @@ -15,16 +15,16 @@ // Trying to login if ($_SERVER["REQUEST_METHOD"] == "POST") { - $uname=strtolower($_POST["uname"]); // Empty username or password field if (empty($_POST["uname"]) || empty($_POST["psw"])) { $loginErr = "Gebruikersnaam of wachtwoord is niet ingevuld"; } else { - $psw=$_POST["psw"]; - $hash=getUser()["password"]; - $userid=getUser()["userID"]; + $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)) { diff --git a/website/public/register.php b/website/public/register.php index c454d66..66d1454 100644 --- a/website/public/register.php +++ b/website/public/register.php @@ -4,7 +4,7 @@ include("../views/login_head.php"); require_once("../queries/connect.php"); include_once("../queries/register.php"); - + include_once("../queries/checkInput.php"); ?> diff --git a/website/queries/checkInput.php b/website/queries/checkInput.php new file mode 100644 index 0000000..d48e4e0 --- /dev/null +++ b/website/queries/checkInput.php @@ -0,0 +1,95 @@ + diff --git a/website/views/login-view.php b/website/views/login-view.php index 9214a89..33fa7e9 100644 --- a/website/views/login-view.php +++ b/website/views/login-view.php @@ -46,6 +46,6 @@ diff --git a/website/views/register-view.php b/website/views/register-view.php index f2b9257..b95dd81 100644 --- a/website/views/register-view.php +++ b/website/views/register-view.php @@ -108,7 +108,7 @@ From 1640d38baac03a31d8272461a96b287ba17655ca Mon Sep 17 00:00:00 2001 From: Hendrik Date: Thu, 19 Jan 2017 16:29:38 +0100 Subject: [PATCH 08/50] 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
-
-            
-        
From e0d02d283de79c8238bed1951af6eeb2a563a2ad Mon Sep 17 00:00:00 2001 From: Hendrik Date: Thu, 19 Jan 2017 16:42:45 +0100 Subject: [PATCH 09/50] 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']; From 7df182676adee1eae1cb0b2cad7f4fba4154956b Mon Sep 17 00:00:00 2001 From: Joey Lai Date: Fri, 20 Jan 2017 10:45:53 +0100 Subject: [PATCH 10/50] Added comments to checkinput.php --- website/queries/checkInput.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/website/queries/checkInput.php b/website/queries/checkInput.php index d48e4e0..ceb110f 100644 --- a/website/queries/checkInput.php +++ b/website/queries/checkInput.php @@ -1,4 +1,10 @@ Date: Fri, 20 Jan 2017 11:19:54 +0100 Subject: [PATCH 11/50] Fixed include checkinput.php --- website/public/login.php | 1 + website/public/register.php | 2 +- website/queries/checkInput.php | 8 ++++---- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/website/public/login.php b/website/public/login.php index d8eb62a..c78b3ca 100644 --- a/website/public/login.php +++ b/website/public/login.php @@ -4,6 +4,7 @@ include("../views/login_head.php"); require_once("../queries/connect.php"); include_once("../queries/login.php"); + include_once("../queries/checkInput.php") ?> Date: Fri, 20 Jan 2017 11:25:38 +0100 Subject: [PATCH 12/50] fixed spelling --- website/queries/checkInput.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/queries/checkInput.php b/website/queries/checkInput.php index 25e5149..f711676 100644 --- a/website/queries/checkInput.php +++ b/website/queries/checkInput.php @@ -22,7 +22,7 @@ function checkInputChoice($variable, $option){ break; case "longerEight"; - longerEigth($variable); + longerEight($variable); break; case "email"; From db2fb1b353ce77ddf9ee5f39dc8c0ef8071c14b4 Mon Sep 17 00:00:00 2001 From: Joey Lai Date: Fri, 20 Jan 2017 11:51:50 +0100 Subject: [PATCH 13/50] 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 @@ + + + From dfc04be8b6c13b6df70aa16817f8960ba34df4d3 Mon Sep 17 00:00:00 2001 From: Joey Lai Date: Fri, 20 Jan 2017 11:56:30 +0100 Subject: [PATCH 14/50] 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 From 66e4fa189c559f978e88eab059aef927dd1e5ca1 Mon Sep 17 00:00:00 2001 From: Joey Lai Date: Fri, 20 Jan 2017 11:58:33 +0100 Subject: [PATCH 15/50] 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 From 44bbbfeaaef03a66a3ad837d3dc8f3ea6dcd669f Mon Sep 17 00:00:00 2001 From: Joey Lai Date: Fri, 20 Jan 2017 12:01:27 +0100 Subject: [PATCH 16/50] 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 From 3152839dae104cc90a56642de543173bb49d8cc9 Mon Sep 17 00:00:00 2001 From: Hendrik Date: Fri, 20 Jan 2017 12:06:23 +0100 Subject: [PATCH 17/50] 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" . "> From 142bae139b8ca9ee93329aae1c2fb28c0d49e84d Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Fri, 20 Jan 2017 12:14:05 +0100 Subject: [PATCH 18/50] 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); From 50cec9beede427dc4455b9e1851e8e7e242a2a5a Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Fri, 20 Jan 2017 12:25:18 +0100 Subject: [PATCH 19/50] 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 "
  • From daff2f41faf4b0f8b7def9edc294aace9976f068 Mon Sep 17 00:00:00 2001 From: Hendrik Date: Fri, 20 Jan 2017 12:29:34 +0100 Subject: [PATCH 20/50] 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 } } From eb1fc154015d8477041aee70a05c2561f8983196 Mon Sep 17 00:00:00 2001 From: Joey Lai Date: Fri, 20 Jan 2017 12:32:39 +0100 Subject: [PATCH 21/50] 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") ?> + + - - - From 6c41e825fe4527ca83949d647183d70eb34466c4 Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Fri, 20 Jan 2017 12:53:23 +0100 Subject: [PATCH 22/50] 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 23/50] 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']; From bfdf9e989b2a724f505975d9ab79ccef106e937d Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Fri, 20 Jan 2017 13:07:47 +0100 Subject: [PATCH 24/50] 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 From 6418b2b679fdaee5f70da8dddf6321989ea5ea5d Mon Sep 17 00:00:00 2001 From: Hendrik Date: Fri, 20 Jan 2017 13:14:28 +0100 Subject: [PATCH 25/50] 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); From 61c148e127bade2b031d75264504a84754b70200 Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Fri, 20 Jan 2017 13:30:40 +0100 Subject: [PATCH 26/50] 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(""); } From b7620fe4dbe3cdaf595eb71087b485e4bbeaf81e Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Fri, 20 Jan 2017 14:05:20 +0100 Subject: [PATCH 27/50] 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 From f9c55323ad54047ab80381499fef430b3f49fd8b Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Fri, 20 Jan 2017 14:09:04 +0100 Subject: [PATCH 28/50] 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) { From 0e5f7dc9fb4e7581bef3d1f85ef1231ad9ad71c0 Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Fri, 20 Jan 2017 14:10:32 +0100 Subject: [PATCH 29/50] 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.

    "; } ?> From adb7f2f37db78f7099b3fedbcfe48d783c9c91a7 Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Fri, 20 Jan 2017 14:31:49 +0100 Subject: [PATCH 30/50] 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 From 6478ce920f56a1fe1b004b99ef253cdc6fe10a1e Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Fri, 20 Jan 2017 14:40:21 +0100 Subject: [PATCH 31/50] 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 From 42188609363a214a33a7df8a5bbd8c91a3e6334a Mon Sep 17 00:00:00 2001 From: Hendrik Date: Fri, 20 Jan 2017 14:43:04 +0100 Subject: [PATCH 32/50] 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; -} ?>
    From ca28724274047a90649944303022a2d503cd45f7 Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Fri, 20 Jan 2017 14:48:00 +0100 Subject: [PATCH 33/50] 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 34/50] 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
    • From e547712b2a6020aaee8cb59ee4795287f82dfa74 Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Fri, 20 Jan 2017 15:02:05 +0100 Subject: [PATCH 35/50] 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 "
    • -
      + - - From e7d63c2f572a79d6a2250e2f3ae23a57f6e370fc Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Fri, 20 Jan 2017 15:34:01 +0100 Subject: [PATCH 37/50] 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) { From 587d0e6ac351787fe1d944b06c6a05b42e1952f1 Mon Sep 17 00:00:00 2001 From: Marijn Jansen Date: Fri, 20 Jan 2017 15:41:13 +0100 Subject: [PATCH 38/50] 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 @@

      From e17a55e82dff94723917a2393698892134aab18e Mon Sep 17 00:00:00 2001 From: Joey Lai Date: Fri, 20 Jan 2017 16:01:08 +0100 Subject: [PATCH 39/50] 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"); ?> - - + From 6ff70440e67ad96ef71867ef26ca1a1f3f90135c Mon Sep 17 00:00:00 2001 From: Joey Lai Date: Fri, 20 Jan 2017 16:14:32 +0100 Subject: [PATCH 40/50] 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 @@ - + From 173ef3e50c2feceb27e715fddbfc33aac08ff5db Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Fri, 20 Jan 2017 16:17:56 +0100 Subject: [PATCH 41/50] 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 From 9152ae4f75b17fd7903ba10624f54560f337a637 Mon Sep 17 00:00:00 2001 From: Hendrik Date: Fri, 20 Jan 2017 16:18:09 +0100 Subject: [PATCH 42/50] 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 +
      From 18185020c3b4a389d623042050a8edafe622dc6a Mon Sep 17 00:00:00 2001 From: "K. Nobel" Date: Fri, 20 Jan 2017 16:18:12 +0100 Subject: [PATCH 43/50] 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 " From ac96200d1642a663c61545de841af182285d9981 Mon Sep 17 00:00:00 2001 From: Marijn Jansen Date: Fri, 20 Jan 2017 16:20:34 +0100 Subject: [PATCH 44/50] 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 From 2a44057233f4abb86eec42c419e566adcb5e7d2d Mon Sep 17 00:00:00 2001 From: Marijn Jansen Date: Sun, 22 Jan 2017 11:23:13 +0100 Subject: [PATCH 45/50] 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(); From 93b6835ea4400193d9a8fe98ecbafb7018ab4697 Mon Sep 17 00:00:00 2001 From: Lars van Hijfte Date: Mon, 23 Jan 2017 11:33:27 +0100 Subject: [PATCH 46/50] 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 @@
    $username $role
    $name $role