Marijn button #99
2
.gitignore
vendored
2
.gitignore
vendored
@@ -117,7 +117,7 @@ Temporary Items
|
|||||||
# *.pdf
|
# *.pdf
|
||||||
|
|
||||||
## Generated if empty string is given at "Please type another file name for output:"
|
## Generated if empty string is given at "Please type another file name for output:"
|
||||||
projectplan.pdf
|
projectplan/projectplan.pdf
|
||||||
|
|
||||||
## Bibliography auxiliary files (bibtex/biblatex/biber):
|
## Bibliography auxiliary files (bibtex/biblatex/biber):
|
||||||
*.bbl
|
*.bbl
|
||||||
|
|||||||
6
.idea/sqldialects.xml
generated
Normal file
6
.idea/sqldialects.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="SqlDialectMappings">
|
||||||
|
<file url="file://$PROJECT_DIR$" dialect="MySQL" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
Binary file not shown.
@@ -14,6 +14,9 @@
|
|||||||
\documentclass{uva-inf-article}
|
\documentclass{uva-inf-article}
|
||||||
\usepackage[dutch]{babel}
|
\usepackage[dutch]{babel}
|
||||||
\usepackage{enumitem}
|
\usepackage{enumitem}
|
||||||
|
\usepackage{pgfgantt}
|
||||||
|
\usepackage{pdflscape}
|
||||||
|
\usepackage{geometry}
|
||||||
|
|
||||||
%-------------------------------------------------------------------------------
|
%-------------------------------------------------------------------------------
|
||||||
% GEGEVENS VOOR IN DE TITEL
|
% GEGEVENS VOOR IN DE TITEL
|
||||||
@@ -173,6 +176,83 @@ Voor deze opdracht hebben we met 5 mensen 4 weken de tijd.
|
|||||||
|
|
||||||
%Zet de planning indien gewenst in een apart document
|
%Zet de planning indien gewenst in een apart document
|
||||||
%\input{planning}
|
%\input{planning}
|
||||||
|
\newgeometry{top=20mm, bottom=20mm, left=10mm, right=10mm}
|
||||||
|
\begin{landscape}
|
||||||
|
\section{Planning}
|
||||||
|
\begin{ganttchart}[
|
||||||
|
vgrid,
|
||||||
|
hgrid,
|
||||||
|
x unit=1cm,
|
||||||
|
y unit title=.6cm,
|
||||||
|
y unit chart=.7cm,
|
||||||
|
group left peak width=.2,
|
||||||
|
group right peak width=.2
|
||||||
|
]{1}{21}
|
||||||
|
\gantttitle{MyHyvesBook+}{21} \ganttnewline
|
||||||
|
\gantttitle{Week 1}{5}
|
||||||
|
\gantttitle{Week 2}{5}
|
||||||
|
\gantttitle{Week 3}{5}
|
||||||
|
\gantttitle{Week 4}{5} \ganttnewline
|
||||||
|
\gantttitlelist{9,...,13}{1}
|
||||||
|
\gantttitlelist{16,...,20}{1}
|
||||||
|
\gantttitlelist{23,...,27}{1}
|
||||||
|
\gantttitlelist{30,31,1,2,3}{1} \ganttnewline
|
||||||
|
|
||||||
|
\ganttbar{Inleiden}{1}{1} \ganttnewline
|
||||||
|
|
||||||
|
\ganttlinkedgroup{Frontend}{2}{5} \ganttnewline
|
||||||
|
|
||||||
|
\ganttbar{html/views}{2}{5} \ganttnewline
|
||||||
|
\ganttbar{css/styles}{2}{5} \ganttnewline
|
||||||
|
\ganttbar{javascript}{2}{5} \ganttnewline
|
||||||
|
\ganttmilestone{Week 1}{5} \ganttnewline
|
||||||
|
|
||||||
|
\ganttlink[link mid=.833]{elem2}{elem5}
|
||||||
|
\ganttlink[link mid=.75]{elem3}{elem5}
|
||||||
|
\ganttlink[link mid=.5]{elem4}{elem5}
|
||||||
|
|
||||||
|
\ganttlinkedgroup{Backend}{6}{10} \ganttnewline
|
||||||
|
|
||||||
|
\ganttbar{Database/PhpMyAdmin}{6}{6} \ganttnewline
|
||||||
|
\ganttbar{SQL-queries/MySql}{7}{10} \ganttnewline
|
||||||
|
\ganttbar{Forms/php}{6}{10} \ganttnewline
|
||||||
|
\ganttbar{Livechat/AJAX, PHP}{6}{10} \ganttnewline
|
||||||
|
\ganttmilestone{Week 2}{10} \ganttnewline
|
||||||
|
|
||||||
|
\ganttlink[link mid=.5]{elem7}{elem8}
|
||||||
|
\ganttlink[link mid=.833]{elem8}{elem11}
|
||||||
|
\ganttlink[link mid=.75]{elem9}{elem11}
|
||||||
|
\ganttlink[link mid=.5]{elem10}{elem11}
|
||||||
|
|
||||||
|
\ganttbar{Beveiliging/testen}{6}{15} \ganttnewline
|
||||||
|
|
||||||
|
\ganttgroup{Gebruiksvriendleijk}{11}{15} \ganttnewline
|
||||||
|
\ganttbar{Mobileformaat}{11}{15} \ganttnewline
|
||||||
|
\ganttbar{Restyle}{11}{15} \ganttnewline
|
||||||
|
\ganttbar{Extra's}{11}{15} \ganttnewline
|
||||||
|
\ganttbar{Code opschonen}{14}{15} \ganttnewline
|
||||||
|
|
||||||
|
\ganttmilestone{Week 3}{15} \ganttnewline
|
||||||
|
\ganttlink[link mid=.75]{elem11}{elem13}
|
||||||
|
\ganttlink[link mid=.917]{elem12}{elem18}
|
||||||
|
\ganttlink[link mid=.875]{elem14}{elem18}
|
||||||
|
\ganttlink[link mid=.833]{elem15}{elem18}
|
||||||
|
\ganttlink[link mid=.75]{elem16}{elem18}
|
||||||
|
\ganttlink[link mid=.5]{elem17}{elem18}
|
||||||
|
|
||||||
|
\ganttlinkedgroup{Afronding}{16}{20} \ganttnewline
|
||||||
|
\ganttbar{Rapport}{16}{20} \ganttnewline
|
||||||
|
\ganttbar{Documentatie}{16}{20} \ganttnewline
|
||||||
|
\ganttbar{Demo}{18}{20} \ganttnewline
|
||||||
|
|
||||||
|
\ganttmilestone{Finshed!}{20}
|
||||||
|
\ganttlink[link mid=.833]{elem20}{elem23}
|
||||||
|
\ganttlink[link mid=.75]{elem21}{elem23}
|
||||||
|
\ganttlink[link mid=.5]{elem22}{elem23}
|
||||||
|
|
||||||
|
\end{ganttchart}
|
||||||
|
\end{landscape}
|
||||||
|
|
||||||
|
|
||||||
%-------------------------------------------------------------------------------
|
%-------------------------------------------------------------------------------
|
||||||
% BIJLAGEN EN EINDE
|
% BIJLAGEN EN EINDE
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
<style>
|
<style>
|
||||||
@import url("styles/chat.css");
|
@import url("styles/chat.css");
|
||||||
</style>
|
</style>
|
||||||
|
<script src="js/chat.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
BIN
website/public/external/nietslecht_button.png
vendored
BIN
website/public/external/nietslecht_button.png
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 63 KiB |
BIN
website/public/img/notbad.jpg
Normal file
BIN
website/public/img/notbad.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
57
website/public/js/chat.js
Normal file
57
website/public/js/chat.js
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
$(document).ready(function() {
|
||||||
|
loadMessages();
|
||||||
|
});
|
||||||
|
|
||||||
|
function loadMessages() {
|
||||||
|
$.post(
|
||||||
|
"loadMessages.php",
|
||||||
|
$("#lastIDForm").serialize()
|
||||||
|
).done(function(data) {
|
||||||
|
if (data && data != "[]") {
|
||||||
|
console.log(data);
|
||||||
|
messages = JSON.parse(data);
|
||||||
|
addMessages(messages);
|
||||||
|
$("#lastID").val(messages[messages.length - 1].messageID);
|
||||||
|
$("#chat-history").scrollTop($("#chat-history")[0].scrollHeight);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
setTimeout(loadMessages, 1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function sendMessage() {
|
||||||
|
console.log($("#sendMessageForm").serialize());
|
||||||
|
$.post(
|
||||||
|
"sendMessage.php",
|
||||||
|
$("#sendMessageForm").serialize()
|
||||||
|
).done(function( data ) {
|
||||||
|
console.log(data);
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#newContent").val("");
|
||||||
|
}
|
||||||
|
|
||||||
|
function addMessages(messages) {
|
||||||
|
for(i in messages) {
|
||||||
|
if (messages[i].destination == $(".destinationID").val()) {
|
||||||
|
type = "chat-message-self";
|
||||||
|
} else {
|
||||||
|
type = "chat-message-other";
|
||||||
|
}
|
||||||
|
|
||||||
|
$("#chat-history").append('\
|
||||||
|
<div class="chat-message"> \
|
||||||
|
<div class="' + type + '">\
|
||||||
|
' + messages[i].content + '\
|
||||||
|
</div> \
|
||||||
|
</div>\
|
||||||
|
');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function switchUser(userID) {
|
||||||
|
$(".destinationID").val(userID);
|
||||||
|
$("#chat-history").html("");
|
||||||
|
$("#lastID").val("");
|
||||||
|
}
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$(".extra-menu-items").hide();
|
$(".extra-menu-items").hide();
|
||||||
|
$("#menu-back").hide();
|
||||||
|
|
||||||
// Show more friends
|
// Show more friends
|
||||||
$("#more-friends-click").click(function() {
|
$("#more-friends-click").click(function() {
|
||||||
// Show only friends
|
// Show only friends
|
||||||
$("#groups-menu-section").slideUp();
|
$("#groups-menu-section").slideUp();
|
||||||
$("#friends-menu-section a").show();
|
$("#friends-menu-section li").show();
|
||||||
|
|
||||||
// Change buttons
|
// Change buttons
|
||||||
$("#more-friends-click").hide();
|
$("#more-friends-click").hide();
|
||||||
@@ -16,7 +17,7 @@ $(document).ready(function() {
|
|||||||
$("#more-groups-click").click(function() {
|
$("#more-groups-click").click(function() {
|
||||||
// Show only groups
|
// Show only groups
|
||||||
$("#friends-menu-section").slideUp();
|
$("#friends-menu-section").slideUp();
|
||||||
$("#groups-menu-section a").show();
|
$("#groups-menu-section li").show();
|
||||||
|
|
||||||
// Change buttons
|
// Change buttons
|
||||||
$("#more-groups-click").hide();
|
$("#more-groups-click").hide();
|
||||||
|
|||||||
@@ -1,13 +1,44 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<?php
|
<?php
|
||||||
include("../views/login_head.php");
|
include("../views/login_head.php");
|
||||||
|
include_once("../queries/connect.php");
|
||||||
|
include_once("../queries/login.php");
|
||||||
?>
|
?>
|
||||||
<body>
|
<body>
|
||||||
<?php
|
<?php
|
||||||
/*
|
session_start();
|
||||||
* This view adds login view
|
|
||||||
*/
|
// Define variables and set to empty values
|
||||||
|
$uname = $psw ="";
|
||||||
|
$loginErr ="";
|
||||||
|
|
||||||
|
// 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=hashPassword()["password"];
|
||||||
|
$userid=hashPassword()["userID"];
|
||||||
|
|
||||||
|
// If there's an account, go to the profile page
|
||||||
|
if(password_verify($psw.$uname, $hash)) {
|
||||||
|
$_SESSION["userID"] = $userid;
|
||||||
|
header("location: profile.php");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$loginErr = "Inloggegevens zijn niet correct";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This view adds login view */
|
||||||
include("../views/login-view.php");
|
include("../views/login-view.php");
|
||||||
?>
|
?>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
165
website/public/register.php
Normal file
165
website/public/register.php
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<?php
|
||||||
|
include("../views/login_head.php");
|
||||||
|
include_once("../queries/connect.php");
|
||||||
|
include_once("../queries/register.php");
|
||||||
|
|
||||||
|
?>
|
||||||
|
<body>
|
||||||
|
<?php
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
// define variables and set to empty values
|
||||||
|
$name = $surname = $bday = $username = $password = $confirmpassword = $location = $housenumber = $email = "";
|
||||||
|
$genericErr = $nameErr = $surnameErr = $bdayErr = $usernameErr = $passwordErr = $confirmpasswordErr = $locationErr = $housenumberErr = $emailErr = "";
|
||||||
|
$correct = true;
|
||||||
|
|
||||||
|
// Saves information of filling in the form
|
||||||
|
if (isset($_POST["name"])) {
|
||||||
|
$name = $_POST["name"];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($_POST["surname"])) {
|
||||||
|
$surname = $_POST["surname"];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($_POST["bday"])) {
|
||||||
|
$bday = $_POST["bday"];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($_POST["username"])) {
|
||||||
|
$username = $_POST["username"];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($_POST["password"])) {
|
||||||
|
$password = $_POST["password"];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($_POST["location"])) {
|
||||||
|
$location = $_POST["location"];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($_POST["housenumber"])) {
|
||||||
|
$housenumber = $_POST["housenumber"];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($_POST["email"])) {
|
||||||
|
$email = $_POST["email"];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Trying to register an account
|
||||||
|
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||||
|
if (empty($_POST["name"])) {
|
||||||
|
$nameErr = "Naam is verplicht!";
|
||||||
|
$correct = false;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if (!preg_match("/^[a-zA-Z ]*$/",$name)) {
|
||||||
|
$nameErr = "Alleen letters en spaties zijn toegestaan!";
|
||||||
|
$correct = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($_POST["surname"])) {
|
||||||
|
$surnameErr = "Achternaam is verplicht!";
|
||||||
|
$correct = false;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if (!preg_match("/^[a-zA-Z ]*$/",$surname)) {
|
||||||
|
$surnameErr = "Alleen letters en spaties zijn toegestaan!";
|
||||||
|
$correct = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (empty($_POST["bday"])) {
|
||||||
|
$bdayErr = "Geboortedatum is verplicht!";
|
||||||
|
$correct = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($_POST["username"])) {
|
||||||
|
$usernameErr = "Gebruikersnaam is verplicht!";
|
||||||
|
$correct = false;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if (strlen($username) < 6) {
|
||||||
|
$usernameErr = "Gebruikersnaam moet minstens 6 karakters bevatten";
|
||||||
|
$correct = false;
|
||||||
|
|
||||||
|
} else if (getExistingUsername() == 1){
|
||||||
|
$usernameErr = "Gebruikersnaam bestaat al";
|
||||||
|
$correct = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($_POST["password"])) {
|
||||||
|
$passwordErr = "Wachtwoord is verplicht!";
|
||||||
|
$correct = false;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if (strlen($password) < 8) {
|
||||||
|
$passwordErr = "Wachtwoord moet minstens 8 karakters bevatten";
|
||||||
|
$correct = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($_POST["confirmpassword"])) {
|
||||||
|
$confirmpasswordErr = "Herhaal wachtwoord!";
|
||||||
|
$correct = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($_POST["password"] != $_POST["confirmpassword"]) {
|
||||||
|
$confirmpasswordErr = "Wachtwoorden matchen niet";
|
||||||
|
$correct = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($_POST["location"])) {
|
||||||
|
$locationErr = "Straatnaam is verplicht!";
|
||||||
|
$correct = false;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if (!preg_match("/^[a-zA-Z ]*$/",$location)) {
|
||||||
|
$locationErr = "Alleen letters en spaties zijn toegestaan!";
|
||||||
|
$correct = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($_POST["email"])) {
|
||||||
|
$emailErr = "Email is verplicht!";
|
||||||
|
$correct = false;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
|
||||||
|
$emailErr = "Geldige email invullen!";
|
||||||
|
$correct = false;
|
||||||
|
|
||||||
|
} else if (getExistingEmail() == 1){
|
||||||
|
$emailErr = "Email bestaat al";
|
||||||
|
$correct = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Checks if everything is filled in correctly
|
||||||
|
if ($correct == false){
|
||||||
|
$genericErr = "Bepaalde velden zijn verkeerd of niet ingevuld!";
|
||||||
|
|
||||||
|
} else {
|
||||||
|
registerAccount();
|
||||||
|
header("location: login.php");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This view adds register view */
|
||||||
|
include("../views/register-view.php");
|
||||||
|
?>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
16
website/public/sendMessage.php
Normal file
16
website/public/sendMessage.php
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
include_once("../queries/private_message.php");
|
||||||
|
|
||||||
|
if (isset($_POST["destination"]) &&
|
||||||
|
isset($_POST["content"])) {
|
||||||
|
|
||||||
|
if (sendMessage($_POST["destination"], $_POST["content"])) {
|
||||||
|
echo $_POST["content"] . " is naar " . $_POST["destination"] . " gestuurd";
|
||||||
|
} else {
|
||||||
|
echo "YOU FAILED!!!";
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
echo "maybe dont try to hax the system?";
|
||||||
|
}
|
||||||
@@ -1,24 +1,47 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<?php include("../views/head.php"); ?>
|
<?php
|
||||||
|
include("../views/head.php");
|
||||||
|
include_once("../queries/connect.php");
|
||||||
|
include_once("../queries/settings.php");
|
||||||
|
?>
|
||||||
<style>
|
<style>
|
||||||
@import url("styles/settings.css");
|
@import url("styles/settings.css");
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<?php
|
<?php
|
||||||
/*
|
|
||||||
* This view adds the main layout over the screen.
|
|
||||||
* Header and menu.
|
|
||||||
*/
|
|
||||||
include("../views/main.php");
|
include("../views/main.php");
|
||||||
|
|
||||||
/* Add your view files here. */
|
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||||
|
switch ($_POST["form"]) {
|
||||||
|
case "profile":
|
||||||
|
$result = updateSettings();
|
||||||
|
break;
|
||||||
|
case "password":
|
||||||
|
$result = updatePassword();
|
||||||
|
break;
|
||||||
|
case "email":
|
||||||
|
$result = array (
|
||||||
|
"type" => "settings-message-angry",
|
||||||
|
"message" => "Deze functie werkt nog niet :("
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case "picture":
|
||||||
|
$result = array (
|
||||||
|
"type" => "settings-message-angry",
|
||||||
|
"message" => "Deze functie werkt nog niet :("
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
include("../views/settings-view.php");
|
include("../views/settings-view.php");
|
||||||
|
|
||||||
/* This adds the footer. */
|
|
||||||
include("../views/footer.php");
|
include("../views/footer.php");
|
||||||
|
|
||||||
?>
|
?>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -32,17 +32,36 @@
|
|||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.admin-filter {
|
.admin-filter, .admin-filtertype, .admin-groupfilter {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
margin-right: 100px;
|
margin-right: 50px;
|
||||||
|
margin-left: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-filter, .admin-groupfilter {
|
||||||
|
width: 120px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-groupfilter {
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.admin-users {
|
.admin-users {
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.admin-userpage {
|
||||||
|
width: 170px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.usertitle {
|
||||||
|
width: 150px;
|
||||||
|
}
|
||||||
|
|
||||||
.usertable {
|
.usertable {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,19 @@ a, a:link, a:visited, a:hover, a:active {
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a.button {
|
||||||
|
background-color: #845663;
|
||||||
|
border: 2px solid black;
|
||||||
|
border-radius: 12px;
|
||||||
|
color: white;
|
||||||
|
cursor: pointer;
|
||||||
|
height: 50%;
|
||||||
|
margin: 8px 0;
|
||||||
|
padding: 14px 20px;
|
||||||
|
width: 25%;
|
||||||
|
font-family: Arial;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
a[data-title]:hover:after, img[data-title]:hover:after, span[data-title]:hover:after,
|
a[data-title]:hover:after, img[data-title]:hover:after, span[data-title]:hover:after,
|
||||||
div[data-title]:hover:after{
|
div[data-title]:hover:after{
|
||||||
@@ -44,9 +57,14 @@ div[data-title]:hover:after{
|
|||||||
|
|
||||||
/* Body */
|
/* Body */
|
||||||
body {
|
body {
|
||||||
height: 100%;
|
height: 900px;
|
||||||
|
|
||||||
background-color: #B78996;
|
background-image: url(https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTEnqKdVtLbxjKuNsCSCxFRhTOpp3Gm0gsU8bMgA_MeUYyzrUFy);
|
||||||
|
background-size: cover;
|
||||||
|
background-repeat: repeat-x;
|
||||||
|
background-attachment: fixed;
|
||||||
|
|
||||||
|
/*background-color: #B78996;*/
|
||||||
color: #333;
|
color: #333;
|
||||||
|
|
||||||
font-family: Arial, sans-serif;
|
font-family: Arial, sans-serif;
|
||||||
@@ -87,12 +105,14 @@ button {
|
|||||||
|
|
||||||
/* inlogform */
|
/* inlogform */
|
||||||
form {
|
form {
|
||||||
background-color: #a87a87;
|
/*background-color: #a87a87;*/
|
||||||
border: 5px solid #325da3;
|
border: 5px solid #325da3;
|
||||||
|
background-color: #a87a87;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
height: 50%;
|
height: 55%;
|
||||||
margin: auto;
|
margin: 35px auto;
|
||||||
width: 55%;
|
width: 45%;
|
||||||
|
overflow-y:auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* inlog titel */
|
/* inlog titel */
|
||||||
@@ -115,14 +135,14 @@ input[type=text], input[type=password], input[type=email], input[type="date"] {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
height: 50%;
|
height: 50%;
|
||||||
padding: 12px 20px;
|
padding: 8px 20px;
|
||||||
margin: 8px 0;
|
margin: 4px 0;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
font-family: Arial;
|
font-family: Arial;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type=submit] {
|
button[type=submit] {
|
||||||
background-color: #845663;
|
background-color: #845663;
|
||||||
border: 2px solid black;
|
border: 2px solid black;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
@@ -152,6 +172,13 @@ label {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* padding voor foutmelding login */
|
||||||
|
.login_containerfault {
|
||||||
|
padding: 16px;
|
||||||
|
text-align: center;
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
/* The Modal (background) */
|
/* The Modal (background) */
|
||||||
.modal {
|
.modal {
|
||||||
background-color: rgb(0,0,0); /* Fallback color */
|
background-color: rgb(0,0,0); /* Fallback color */
|
||||||
@@ -175,7 +202,8 @@ label {
|
|||||||
margin: 5px auto; /* 15% from the top and centered */
|
margin: 5px auto; /* 15% from the top and centered */
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
width: 40%; /* Could be more or less, depending on screen size */
|
width: 40%; /* Could be more or less, depending on screen size */
|
||||||
height: 80%;
|
height: 60%;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes animatezoom {
|
@keyframes animatezoom {
|
||||||
|
|||||||
@@ -25,3 +25,16 @@
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.friend-item {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu button {
|
||||||
|
background: none;
|
||||||
|
color: #333;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
padding: 0;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
@@ -5,6 +5,17 @@
|
|||||||
.settings-password {
|
.settings-password {
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
}
|
}
|
||||||
|
.settings-message {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.settings-message-angry {
|
||||||
|
background-color: firebrick;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-message-happy {
|
||||||
|
background-color: forestgreen;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.settings li {
|
.settings li {
|
||||||
@@ -21,6 +32,10 @@
|
|||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.settings-password label, .settings-email label {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
/* All the fields for typing things. */
|
/* All the fields for typing things. */
|
||||||
.settings input[type="password"],
|
.settings input[type="password"],
|
||||||
.settings input[type="text"],
|
.settings input[type="text"],
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
<body>
|
<body>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// database gegevens zijn elders opgeslagen
|
|
||||||
include_once("../queries/connect.php");
|
include_once("../queries/connect.php");
|
||||||
include_once("../queries/friendship.php");
|
include_once("../queries/friendship.php");
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,7 @@ if ($dbconf === FALSE) {
|
|||||||
die("Error parsing XML file");
|
die("Error parsing XML file");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$db = new PDO("mysql:host=$dbconf->mysql_host;dbname=$dbconf->mysql_database;charset=utf8",
|
$GLOBALS["db"] = new PDO("mysql:host=$dbconf->mysql_host;dbname=$dbconf->mysql_database;charset=utf8",
|
||||||
"$dbconf->mysql_username", "$dbconf->mysql_password")
|
"$dbconf->mysql_username", "$dbconf->mysql_password")
|
||||||
or die('Error connecting to mysql server');
|
or die('Error connecting to mysql server');
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
21
website/queries/group_member.php
Normal file
21
website/queries/group_member.php
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
function selectAllGroupsFromUser($db, $userID) {
|
||||||
|
return $db->query("
|
||||||
|
SELECT
|
||||||
|
`group_page`.`name`,
|
||||||
|
`group_page`.`picture`
|
||||||
|
FROM
|
||||||
|
`group_page`
|
||||||
|
INNER JOIN
|
||||||
|
`group_member`
|
||||||
|
WHERE
|
||||||
|
`group_member`.`userID` = $userID AND
|
||||||
|
`group_member`.`groupID` = `group_page`.`groupID` AND
|
||||||
|
`group_page`.`status` != 0
|
||||||
|
");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
99
website/queries/group_page.php
Normal file
99
website/queries/group_page.php
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
function selectGroupById($db, $groupID) {
|
||||||
|
return $db->query("
|
||||||
|
SELECT
|
||||||
|
`group_page`.`name`,
|
||||||
|
`group_page`.`picture`,
|
||||||
|
`group_page`.`description`,
|
||||||
|
`group_page`.`status`,
|
||||||
|
`group_page`.`creationdate`
|
||||||
|
FROM
|
||||||
|
`group_page`
|
||||||
|
WHERE
|
||||||
|
`group_page`.`groupID` = $groupID
|
||||||
|
");
|
||||||
|
}
|
||||||
|
|
||||||
|
function select20GroupsFromN($db, $n) {
|
||||||
|
return $db->query("
|
||||||
|
SELECT
|
||||||
|
`group_page`.`groupID`,
|
||||||
|
`group_page`.`name`,
|
||||||
|
`group_page`.`picture`,
|
||||||
|
`group_page`.`description`,
|
||||||
|
`group_page`.`status`,
|
||||||
|
`group_page`.`creationdate`
|
||||||
|
FROM
|
||||||
|
`group_page`
|
||||||
|
ORDER BY
|
||||||
|
`group_page`.`name` ASC
|
||||||
|
LIMIT
|
||||||
|
$n, 20
|
||||||
|
");
|
||||||
|
}
|
||||||
|
|
||||||
|
function select20GroupsByStatusFromN($db, $n, $status) {
|
||||||
|
return $db->query("
|
||||||
|
SELECT
|
||||||
|
`group_page`.`groupID`,
|
||||||
|
`group_page`.`name`,
|
||||||
|
`group_page`.`picture`,
|
||||||
|
`group_page`.`description`,
|
||||||
|
`group_page`.`status`,
|
||||||
|
`group_page`.`creationdate`
|
||||||
|
FROM
|
||||||
|
`group_page`
|
||||||
|
WHERE
|
||||||
|
`group_page`.`status` = $status
|
||||||
|
ORDER BY
|
||||||
|
`group_page`.`name` ASC
|
||||||
|
LIMIT
|
||||||
|
$n, 20
|
||||||
|
");
|
||||||
|
}
|
||||||
|
|
||||||
|
function search20GroupsFromNByStatus($db, $n, $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, 20
|
||||||
|
");
|
||||||
|
|
||||||
|
$keyword = "%$keyword%";
|
||||||
|
$q->bindParam(':keyword', $keyword);
|
||||||
|
$q->bindParam(':n', $n, PDO::PARAM_INT);
|
||||||
|
$statuses = implode(',', $status);
|
||||||
|
$q->bindParam(':statuses', $statuses);
|
||||||
|
$q->execute();
|
||||||
|
return $q;
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeGroupStatusByID($db, $id, $status) {
|
||||||
|
$q = $db->query("
|
||||||
|
UPDATE
|
||||||
|
`group_page`
|
||||||
|
SET
|
||||||
|
`status` = $status
|
||||||
|
WHERE
|
||||||
|
`groupID` = $id
|
||||||
|
");
|
||||||
|
|
||||||
|
return $q;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
19
website/queries/login.php
Normal file
19
website/queries/login.php
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
function hashPassword() {
|
||||||
|
$stmt = $GLOBALS["db"]->prepare("
|
||||||
|
SELECT
|
||||||
|
`password`,
|
||||||
|
`userID`
|
||||||
|
FROM
|
||||||
|
`user`
|
||||||
|
WHERE
|
||||||
|
`username` LIKE :username
|
||||||
|
");
|
||||||
|
|
||||||
|
$stmt->bindParam(":username", $_POST["uname"]);
|
||||||
|
$stmt->execute();
|
||||||
|
return $stmt->fetch(PDO::FETCH_ASSOC);
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
85
website/queries/private_message.php
Normal file
85
website/queries/private_message.php
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
include_once("connect.php");
|
||||||
|
|
||||||
|
session_start();
|
||||||
|
|
||||||
|
function getOldChatMessages($user2ID) {
|
||||||
|
$db = $GLOBALS["db"];
|
||||||
|
$user1ID = $_SESSION["userID"];
|
||||||
|
|
||||||
|
$stmt = $db->prepare("
|
||||||
|
SELECT
|
||||||
|
*
|
||||||
|
FROM
|
||||||
|
`private_message`
|
||||||
|
WHERE
|
||||||
|
`origin` = :user1 AND
|
||||||
|
`destination` = :user2 OR
|
||||||
|
`origin` = :user2 AND
|
||||||
|
`destination` = :user1
|
||||||
|
ORDER BY
|
||||||
|
`messageID` ASC
|
||||||
|
");
|
||||||
|
|
||||||
|
$stmt->bindParam(":user1", $user1ID);
|
||||||
|
$stmt->bindParam(":user2", $user2ID);
|
||||||
|
|
||||||
|
$stmt->execute();
|
||||||
|
|
||||||
|
return json_encode($stmt->fetchAll());
|
||||||
|
}
|
||||||
|
|
||||||
|
function sendMessage($destination, $content) {
|
||||||
|
$db = $GLOBALS["db"];
|
||||||
|
$stmt = $db->prepare("
|
||||||
|
INSERT INTO
|
||||||
|
`private_message`
|
||||||
|
(
|
||||||
|
`origin`,
|
||||||
|
`destination`,
|
||||||
|
`content`
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
(
|
||||||
|
:origin,
|
||||||
|
:destination,
|
||||||
|
:content
|
||||||
|
)
|
||||||
|
");
|
||||||
|
|
||||||
|
return $stmt->execute(array(
|
||||||
|
"origin" => $_SESSION["userID"],
|
||||||
|
"destination" => $destination,
|
||||||
|
"content" => $content
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
function getNewChatMessages($lastID, $destination) {
|
||||||
|
$db = $GLOBALS["db"];
|
||||||
|
$origin = $_SESSION["userID"];
|
||||||
|
|
||||||
|
$stmt = $db->prepare("
|
||||||
|
SELECT
|
||||||
|
*
|
||||||
|
FROM
|
||||||
|
`private_message`
|
||||||
|
WHERE
|
||||||
|
(
|
||||||
|
`origin` = :user1 AND
|
||||||
|
`destination` = :user2 OR
|
||||||
|
`origin` = :user2 AND
|
||||||
|
`destination` = :user1) AND
|
||||||
|
`messageID` > :lastID
|
||||||
|
ORDER BY
|
||||||
|
`messageID` ASC
|
||||||
|
");
|
||||||
|
|
||||||
|
$stmt->bindParam(':user1', $origin);
|
||||||
|
$stmt->bindParam(':user2', $destination);
|
||||||
|
$stmt->bindParam(':lastID', $lastID);
|
||||||
|
|
||||||
|
$stmt->execute();
|
||||||
|
|
||||||
|
return json_encode($stmt->fetchAll());
|
||||||
|
}
|
||||||
68
website/queries/register.php
Normal file
68
website/queries/register.php
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
function getExistingUsername() {
|
||||||
|
$stmt = $GLOBALS["db"]->prepare("
|
||||||
|
SELECT
|
||||||
|
`username`
|
||||||
|
FROM
|
||||||
|
`user`
|
||||||
|
WHERE
|
||||||
|
`username` LIKE :username
|
||||||
|
");
|
||||||
|
|
||||||
|
$stmt->bindParam(":username", $_POST["username"]);
|
||||||
|
$stmt->execute();
|
||||||
|
return $stmt->rowCount();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function getExistingEmail() {
|
||||||
|
$stmt = $GLOBALS["db"]->prepare("
|
||||||
|
SELECT
|
||||||
|
`email`
|
||||||
|
FROM
|
||||||
|
`user`
|
||||||
|
WHERE
|
||||||
|
`email` LIKE :email
|
||||||
|
");
|
||||||
|
|
||||||
|
$stmt->bindParam(":email", $_POST["email"]);
|
||||||
|
$stmt->execute();
|
||||||
|
return $stmt->rowCount();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function registerAccount() {
|
||||||
|
$stmt = $GLOBALS["db"]->prepare("
|
||||||
|
INSERT INTO
|
||||||
|
`user`(fname,
|
||||||
|
lname,
|
||||||
|
birthdate,
|
||||||
|
username,
|
||||||
|
password,
|
||||||
|
location,
|
||||||
|
email)
|
||||||
|
VALUES(
|
||||||
|
:fname,
|
||||||
|
:lname,
|
||||||
|
:bday,
|
||||||
|
:username,
|
||||||
|
:password,
|
||||||
|
:location,
|
||||||
|
:email
|
||||||
|
)");
|
||||||
|
|
||||||
|
$hash=password_hash($_POST["password"].(strtolower($_POST["username"])), 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->execute();
|
||||||
|
$stmt->rowCount();
|
||||||
|
}
|
||||||
|
?>
|
||||||
109
website/queries/settings.php
Normal file
109
website/queries/settings.php
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
function getSettings() {
|
||||||
|
$stmt = $GLOBALS["db"]->prepare("
|
||||||
|
SELECT
|
||||||
|
`fname`,
|
||||||
|
`lname`,
|
||||||
|
`email`,
|
||||||
|
`location`,
|
||||||
|
`birthdate`,
|
||||||
|
`bio`,
|
||||||
|
`profilepicture`
|
||||||
|
FROM
|
||||||
|
`user`
|
||||||
|
WHERE
|
||||||
|
`userID` = :userID
|
||||||
|
");
|
||||||
|
|
||||||
|
$stmt->bindParam(":userID", $_SESSION["userID"]);
|
||||||
|
$stmt->execute();
|
||||||
|
return $stmt->fetch();
|
||||||
|
}
|
||||||
|
|
||||||
|
function getPasswordHash() {
|
||||||
|
$stmt = $GLOBALS["db"]->prepare("
|
||||||
|
SELECT
|
||||||
|
`password`,
|
||||||
|
`username`
|
||||||
|
FROM
|
||||||
|
`user`
|
||||||
|
WHERE
|
||||||
|
`userID` = :userID
|
||||||
|
");
|
||||||
|
$stmt->bindParam(":userID", $_SESSION["userID"]);
|
||||||
|
$stmt->execute();
|
||||||
|
return $stmt->fetch();
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateSettings() {
|
||||||
|
$stmt = $GLOBALS["db"]->prepare("
|
||||||
|
UPDATE
|
||||||
|
`user`
|
||||||
|
SET
|
||||||
|
`fname` = :fname,
|
||||||
|
`lname` = :lname,
|
||||||
|
`location` = :location,
|
||||||
|
`birthdate` = :bday,
|
||||||
|
`bio` = :bio
|
||||||
|
WHERE
|
||||||
|
`userID` = :userID
|
||||||
|
");
|
||||||
|
|
||||||
|
$stmt->bindParam(":fname", $_POST["fname"]);
|
||||||
|
$stmt->bindParam(":lname", $_POST["lname"]);
|
||||||
|
$stmt->bindParam(":location", $_POST["location"]);
|
||||||
|
$stmt->bindParam(":bday", $_POST["bday"]);
|
||||||
|
$stmt->bindParam(":bio", $_POST["bio"]);
|
||||||
|
$stmt->bindParam(":userID", $_SESSION["userID"]);
|
||||||
|
|
||||||
|
$stmt->execute();
|
||||||
|
|
||||||
|
return array (
|
||||||
|
"type" => "settings-message-happy",
|
||||||
|
"message" => "Instellingen zijn opgeslagen."
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function updatePassword() {
|
||||||
|
$user = getPasswordHash();
|
||||||
|
if (password_verify($_POST["password-old"].strtolower($user["username"]), $user["password"])) {
|
||||||
|
if ($_POST["password-new"] == $_POST["password-confirm"] && (strlen($_POST["password-new"]) >= 8)) {
|
||||||
|
if (changePassword($user)) {
|
||||||
|
return array ("type" => "settings-message-happy",
|
||||||
|
"message" => "Wachtwoord gewijzigd.");
|
||||||
|
} else {
|
||||||
|
return array (
|
||||||
|
"type" => "settings-message-angry",
|
||||||
|
"message" => "Er is iets mis gegaan.");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return array (
|
||||||
|
"type" => "settings-message-angry",
|
||||||
|
"message" => "Wachtwoorden komen niet oveeen."
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return array(
|
||||||
|
"type" => "settings-message-angry",
|
||||||
|
"message" => "Oud wachtwoord niet correct."
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function changePassword($user) {
|
||||||
|
$stmt =$GLOBALS["db"]->prepare("
|
||||||
|
UPDATE
|
||||||
|
`user`
|
||||||
|
SET
|
||||||
|
`password` = :new_password
|
||||||
|
WHERE
|
||||||
|
`userID` = :userID
|
||||||
|
");
|
||||||
|
|
||||||
|
$hashed_password = password_hash($_POST["password-new"].strtolower($user["username"]), PASSWORD_DEFAULT);
|
||||||
|
$stmt->bindParam(":new_password", $hashed_password);
|
||||||
|
$stmt->bindParam(":userID", $_SESSION["userID"]);
|
||||||
|
$stmt->execute();
|
||||||
|
return $stmt->rowCount();
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
require("connect.php");
|
require("connect.php");
|
||||||
|
|
||||||
function getUserID($db, $username) {
|
function getUserID($db, $username) {
|
||||||
@@ -85,3 +86,88 @@ function selectAllUserPosts($db, $userID) {
|
|||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
return $stmt;
|
return $stmt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function select20UsersFromN($db, $n) {
|
||||||
|
return $db->query("
|
||||||
|
SELECT
|
||||||
|
`userID`,
|
||||||
|
`username`,
|
||||||
|
`role`,
|
||||||
|
`bancomment`
|
||||||
|
FROM
|
||||||
|
`user`
|
||||||
|
ORDER BY
|
||||||
|
`role`,
|
||||||
|
`username`
|
||||||
|
LIMIT
|
||||||
|
$n, 20
|
||||||
|
");
|
||||||
|
}
|
||||||
|
|
||||||
|
function search20UsersFromN($db, $n, $keyword) {
|
||||||
|
$q = $db->prepare("
|
||||||
|
SELECT
|
||||||
|
`userID`,
|
||||||
|
`username`,
|
||||||
|
`role`,
|
||||||
|
`bancomment`
|
||||||
|
FROM
|
||||||
|
`user`
|
||||||
|
WHERE
|
||||||
|
`username` LIKE :keyword
|
||||||
|
ORDER BY
|
||||||
|
`username`
|
||||||
|
LIMIT
|
||||||
|
:n, 20
|
||||||
|
");
|
||||||
|
|
||||||
|
$keyword = "%$keyword%";
|
||||||
|
$q->bindParam(':keyword', $keyword);
|
||||||
|
$q->bindParam(':n', $n, PDO::PARAM_INT);
|
||||||
|
$q->execute();
|
||||||
|
return $q;
|
||||||
|
}
|
||||||
|
|
||||||
|
function search20UsersFromNByStatus($db, $n, $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, 20
|
||||||
|
");
|
||||||
|
|
||||||
|
$keyword = "%$keyword%";
|
||||||
|
$q->bindParam(':keyword', $keyword);
|
||||||
|
$q->bindParam(':n', $n, PDO::PARAM_INT);
|
||||||
|
$statuses = implode(',', $status);
|
||||||
|
$q->bindParam(':statuses', $statuses);
|
||||||
|
$q->execute();
|
||||||
|
return $q;
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeUserStatusByID($db, $id, $status) {
|
||||||
|
$q = $db->query("
|
||||||
|
UPDATE
|
||||||
|
`user`
|
||||||
|
SET
|
||||||
|
`role` = $status
|
||||||
|
WHERE
|
||||||
|
`userID` = $id
|
||||||
|
");
|
||||||
|
|
||||||
|
return $q;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Admin Panel</title>
|
<title>Admin Panel</title>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
window.onload = function() {
|
||||||
|
changeFilter();
|
||||||
|
};
|
||||||
|
|
||||||
function checkAll(allbox) {
|
function checkAll(allbox) {
|
||||||
var checkboxes = document.getElementsByName('check1');
|
var checkboxes = document.getElementsByName('checkbox-user[]');
|
||||||
|
|
||||||
for (var i = 0; i < checkboxes.length; i++) {
|
for (var i = 0; i < checkboxes.length; i++) {
|
||||||
if (checkboxes[i].type == 'checkbox') {
|
if (checkboxes[i].type == 'checkbox') {
|
||||||
@@ -13,40 +17,158 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function changeFilter() {
|
||||||
|
if (document.getElementById('group').checked) {
|
||||||
|
document.getElementById('admin-filter').style.display = 'none';
|
||||||
|
document.getElementById('admin-groupfilter').style.display = 'inline-block';
|
||||||
|
} else {
|
||||||
|
document.getElementById('admin-filter').style.display = 'inline-block';
|
||||||
|
document.getElementById('admin-groupfilter').style.display = 'none';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
<?php
|
||||||
<body>
|
include_once("../queries/user.php");
|
||||||
<div class="content">
|
include_once("../queries/group_page.php");
|
||||||
|
?>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<!-- function test_input taken from http://www.w3schools.com/php/php_form_validation.asp -->
|
||||||
|
<?php
|
||||||
|
$search = "";
|
||||||
|
$listnr = 0; // TODO: add page functionality
|
||||||
|
$status = $groupstatus = array();
|
||||||
|
$pagetype = "user";
|
||||||
|
|
||||||
|
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"])) {
|
||||||
|
changeGroupStatusByID($db, $_POST["groupID"], $_POST["actions"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function test_input($data) {
|
||||||
|
$data = trim($data);
|
||||||
|
$data = stripslashes($data);
|
||||||
|
$data = htmlspecialchars($data);
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
<div class="platform admin-panel">
|
<div class="platform admin-panel">
|
||||||
<div class="admin-title">
|
<div class="admin-title">
|
||||||
<h1>User Management Panel</h1>
|
<h1>User Management Panel</h1>
|
||||||
</div> <br>
|
</div> <br>
|
||||||
<form action="admin.php" method="post">
|
<form class="admin-actionform"
|
||||||
|
action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"
|
||||||
|
method="post">
|
||||||
<div class="admin-options">
|
<div class="admin-options">
|
||||||
<form action="admin.php" method="post">
|
<form class="admin-searchform"
|
||||||
|
action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"
|
||||||
|
method="post">
|
||||||
<div class="admin-searchbar">
|
<div class="admin-searchbar">
|
||||||
<h2>Search</h2>
|
<h2>Search</h2>
|
||||||
<input type="text" name="search" class="admin-searchinput"> <br>
|
<input type="text"
|
||||||
|
name="search"
|
||||||
|
class="admin-searchinput"
|
||||||
|
value="<?php echo $search;?>"> <br>
|
||||||
<input type="submit" value="Search">
|
<input type="submit" value="Search">
|
||||||
</div>
|
</div>
|
||||||
<div class="admin-filter">
|
|
||||||
<h2>Show users:</h2>
|
<div class="admin-filter" id="admin-filter">
|
||||||
<input type="checkbox" name="status" value="Active"> Active <br>
|
<h2>Show:</h2>
|
||||||
<input type="checkbox" name="status" value="Muted"> Muted <br>
|
|
||||||
<input type="checkbox" name="status" value="Banned"> Banned
|
<input type="checkbox" name="status[]" id="normal" value="1"
|
||||||
|
<?php if (in_array("1", $status)) echo "checked";?>>
|
||||||
|
<label for="normal">Normal</label><br>
|
||||||
|
<input type="checkbox" name="status[]" id="frozen" value="2"
|
||||||
|
<?php if (in_array("2", $status)) echo "checked";?>>
|
||||||
|
<label for="frozen">Frozen</label><br>
|
||||||
|
<input type="checkbox" name="status[]" id="banned" value="3"
|
||||||
|
<?php if (in_array("3", $status)) echo "checked";?>>
|
||||||
|
<label for="banned">Banned</label><br>
|
||||||
|
<input type="checkbox" name="status[]" id="admin" value="5"
|
||||||
|
<?php if (in_array("5", $status)) echo "checked";?>>
|
||||||
|
<label for="admin">Admin</label><br>
|
||||||
|
<input type="checkbox" name="status[]" id="unvalidated" value="0"
|
||||||
|
<?php if (in_array("0", $status)) echo "checked";?>>
|
||||||
|
<label for="unvalidated">Unvalidated</label><br>
|
||||||
|
<input type="checkbox" name="status[]" id="owner" value="42"
|
||||||
|
<?php if (in_array("42", $status)) echo "checked";?>>
|
||||||
|
<label for="owner">Owner</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="admin-groupfilter" id="admin-groupfilter">
|
||||||
|
<h2>Show:</h2>
|
||||||
|
|
||||||
|
<input type="checkbox" name="groupstatus[]" id="hidden" value="0"
|
||||||
|
<?php if (in_array("0", $groupstatus)) echo "checked";?>>
|
||||||
|
<label for="hidden">Hidden</label><br>
|
||||||
|
<input type="checkbox" name="groupstatus[]" id="public" value="1"
|
||||||
|
<?php if (in_array("1", $groupstatus)) echo "checked";?>>
|
||||||
|
<label for="public">Public</label><br>
|
||||||
|
<input type="checkbox" name="groupstatus[]" id="membersonly" value="2"
|
||||||
|
<?php if (in_array("2", $groupstatus)) echo "checked";?>>
|
||||||
|
<label for="membersonly">Members-only</label><br>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="admin-filtertype">
|
||||||
|
<h2>Page Type:</h2>
|
||||||
|
<input type="radio" name="pagetype" id="user" value="user"
|
||||||
|
<?php if (isset($pagetype) && $pagetype=="user") echo "checked";?>
|
||||||
|
onchange="changeFilter()">
|
||||||
|
<label for="user">Users</label><br>
|
||||||
|
<input type="radio" name="pagetype" id="group" value="group"
|
||||||
|
<?php if (isset($pagetype) && $pagetype=="group") echo "checked";?>
|
||||||
|
onchange="changeFilter()">
|
||||||
|
<label for="group">Groups</label>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div class="admin-actions">
|
<div class="admin-actions">
|
||||||
<h2>Batch Actions: </h2>
|
<h2>Batch Actions: </h2>
|
||||||
<input type="radio" name="actions" value="mute"> Mute <br>
|
<input type="radio" name="actions" id="freeze" value="freeze">
|
||||||
<input type="radio" name="actions" value="ban"> Ban <br>
|
<label for="freeze">Freeze</label><br>
|
||||||
<input type="radio" name="actions" value="unban"> Unban <br> <br>
|
<input type="radio" name="actions" id="ban" value="ban">
|
||||||
|
<label for="ban">Ban</label><br>
|
||||||
|
<input type="radio" name="actions" id="restore" value="restore">
|
||||||
|
<label for="restore">Restore</label><br><br>
|
||||||
<input type="submit" value="Confirm">
|
<input type="submit" value="Confirm">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<div class="admin-users">
|
<div class="admin-users">
|
||||||
<h2>Users:</h2>
|
<h2 class="usertitle">Users:</h2>
|
||||||
|
|
||||||
|
<div class="admin-userpage">
|
||||||
|
<input type="submit" name="prev" value="prev">
|
||||||
|
1 / 1
|
||||||
|
<input type="submit" name="next" value="next">
|
||||||
|
</div> <br>
|
||||||
|
|
||||||
<table class="usertable">
|
<table class="usertable">
|
||||||
<tr>
|
<tr>
|
||||||
<th class="table-checkbox">
|
<th class="table-checkbox">
|
||||||
@@ -57,42 +179,88 @@
|
|||||||
<th class="table-comment">Comment</th>
|
<th class="table-comment">Comment</th>
|
||||||
<th class="table-action">Action</th>
|
<th class="table-action">Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<!-- Table construction via php PDO. -->
|
||||||
|
<?php
|
||||||
|
if ($pagetype == 'user') {
|
||||||
|
$q = search20UsersFromNByStatus($db, $listnr, $search, $status);
|
||||||
|
|
||||||
|
while($user = $q->fetch(PDO::FETCH_ASSOC)) {
|
||||||
|
$userID = $user['userID'];
|
||||||
|
$username = $user['username'];
|
||||||
|
$role = $user['role'];
|
||||||
|
$bancomment = $user['bancomment'];
|
||||||
|
$thispage = htmlspecialchars($_SERVER['PHP_SELF']);
|
||||||
|
|
||||||
|
echo("
|
||||||
<tr>
|
<tr>
|
||||||
<td><input type="checkbox" name="check1"></td>
|
<td><input type='checkbox'
|
||||||
<td>John Smith</td>
|
name='checkbox-user[]'
|
||||||
<td>Banned</td>
|
value='$userID'>
|
||||||
<td>unregulated time travel</td>
|
</td>
|
||||||
|
<td>$username</td>
|
||||||
|
<td>$role</td>
|
||||||
|
<td>$bancomment</td>
|
||||||
<td>
|
<td>
|
||||||
<form class="admin-useraction" action="index.html" method="post">
|
<form class='admin-useraction'
|
||||||
<select class="action" name="actions">
|
action='$thispage'
|
||||||
<option value="mute">Mute</option>
|
method='post'>
|
||||||
<option value="ban">Ban</option>
|
<select class='action' name='actions'>
|
||||||
<option value="unban">Unban</option>
|
<option value='2'>Freeze</option>
|
||||||
|
<option value='3'>Ban</option>
|
||||||
|
<option value='1'>Restore</option>
|
||||||
</select>
|
</select>
|
||||||
<input type="submit" value="Confirm">
|
<input type='hidden' name='userID' value='$userID'>
|
||||||
|
<input type='submit' value='Confirm'>
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$q = search20GroupsFromNByStatus($db, $listnr, $search, $groupstatus);
|
||||||
|
|
||||||
|
while ($group = $q->fetch(PDO::FETCH_ASSOC)) {
|
||||||
|
$groupID = $group['groupID'];
|
||||||
|
$name = $group['name'];
|
||||||
|
$role = $group['status'];
|
||||||
|
$description = $group['description'];
|
||||||
|
$thispage = htmlspecialchars($_SERVER['PHP_SELF']);
|
||||||
|
|
||||||
|
echo("
|
||||||
<tr>
|
<tr>
|
||||||
<td><input type="checkbox" name="check1"></td>
|
<td><input type='checkbox'
|
||||||
<td>poey jokeaim</td>
|
name='checkbox-group[]'
|
||||||
<td>Banned</td>
|
value='$groupID'>
|
||||||
<td>l33t h4xx</td>
|
</td>
|
||||||
|
<td>$name</td>
|
||||||
|
<td>$role</td>
|
||||||
|
<td>$description</td>
|
||||||
<td>
|
<td>
|
||||||
<form class="admin-useraction" action="index.html" method="post">
|
<form class='admin-groupaction'
|
||||||
<select class="action" name="actions">
|
action='$thispage'
|
||||||
<option value="mute">Mute</option>
|
method='post'>
|
||||||
<option value="ban">Ban</option>
|
<select class='action' name='actions'>
|
||||||
<option value="unban">Unban</option>
|
<option value='0'>Hide</option>
|
||||||
|
<option value='1'>Public</option>
|
||||||
|
<option value='2'>Members-only</option>
|
||||||
</select>
|
</select>
|
||||||
<input type="submit" value="Confirm">
|
<input type='hidden' name='groupID' value='$groupID'>
|
||||||
|
<input type='submit' value='Confirm'>
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
<pre>
|
||||||
|
<?php print_r($_POST); ?>
|
||||||
|
</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1,52 +1,83 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="chat">
|
<div class="chat">
|
||||||
<nav class="chat-left left platform chat-recent">
|
<nav class="nav-list chat-left left platform chat-recent">
|
||||||
<h5>Chats</h5>
|
<h5>Chats</h5>
|
||||||
<a href="#">
|
<ul>
|
||||||
<div class="chat-conversation">
|
<?php
|
||||||
<img class="profile-picture" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTDnuRSeeyPve7KwDvJJ6OBzj3gyghwLcE2z9kZeYBOyZavh3mw">
|
include_once("../queries/friendship.php");
|
||||||
Rudolf Leslo
|
|
||||||
|
if (empty($_SESSION["userID"]))
|
||||||
|
$_SESSION["userID"] = 2;
|
||||||
|
|
||||||
|
// Get all the friends of a user.
|
||||||
|
$friends = selectAllFriends($db, $_SESSION["userID"]);
|
||||||
|
$i = 0;
|
||||||
|
|
||||||
|
// Print all the users.
|
||||||
|
while($friend = $friends->fetch(PDO::FETCH_ASSOC)) {
|
||||||
|
$i ++;
|
||||||
|
|
||||||
|
// Set default values of a friend.
|
||||||
|
$username = $friend["username"];
|
||||||
|
$userID = $friend["userID"];
|
||||||
|
$pf = "img/notbad.jpg";
|
||||||
|
|
||||||
|
// Change values if needed.
|
||||||
|
if (!empty($friend["profilepicture"]))
|
||||||
|
$pf = $friend["profilepicture"];
|
||||||
|
|
||||||
|
// Echo the friend.
|
||||||
|
echo "
|
||||||
|
<li class='friend-item' onclick='switchUser(\"$userID\")'>
|
||||||
|
<div class='friend'>
|
||||||
|
<img alt='PF' class='profile-picture' src='$pf'/>
|
||||||
|
$username
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</li>
|
||||||
|
";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
<!-- <a href="#">-->
|
||||||
|
<!-- <div class="chat-conversation">-->
|
||||||
|
<!-- <img class="profile-picture" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTDnuRSeeyPve7KwDvJJ6OBzj3gyghwLcE2z9kZeYBOyZavh3mw">-->
|
||||||
|
<!-- Rudolf Leslo-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </a>-->
|
||||||
</nav>
|
</nav>
|
||||||
<div class="chat-right right">
|
<div class="chat-right right">
|
||||||
<div class="chat-history platform">
|
<div id="chat-history" class="chat-history platform">
|
||||||
<div class="chat-message">
|
|
||||||
<div class="chat-message-self">Hi!</div>
|
|
||||||
</div>
|
|
||||||
<div class="chat-message">
|
|
||||||
<div class="chat-message-other">Hi!</div>
|
|
||||||
</div>
|
|
||||||
<div class="chat-message">
|
|
||||||
<div class="chat-message-self">How it's going?</div>
|
|
||||||
</div>
|
|
||||||
<div class="chat-message">
|
|
||||||
<div class="chat-message-self">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
|
|
||||||
</div>
|
|
||||||
<div class="chat-message">
|
|
||||||
<div class="chat-message-other">Hi!</div>
|
|
||||||
</div>
|
|
||||||
<div class="chat-message">
|
|
||||||
<div class="chat-message-other">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
|
|
||||||
</div>
|
|
||||||
<div class="chat-message">
|
|
||||||
<div class="chat-message-other">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
|
|
||||||
</div>
|
|
||||||
<div class="chat-message">
|
|
||||||
<div class="chat-message-self">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<form id="lastIDForm">
|
||||||
|
<input type="hidden"
|
||||||
|
id="lastID"
|
||||||
|
name="lastID"
|
||||||
|
value=""
|
||||||
|
/>
|
||||||
|
<input type="hidden"
|
||||||
|
name="destination"
|
||||||
|
class="destinationID"
|
||||||
|
value=""
|
||||||
|
/>
|
||||||
|
</form>
|
||||||
<div class="chat-field">
|
<div class="chat-field">
|
||||||
<form method="post">
|
<form id="sendMessageForm" action="javascript:sendMessage();">
|
||||||
|
<input type="hidden"
|
||||||
|
name="destination"
|
||||||
|
class="destinationID"
|
||||||
|
value=""
|
||||||
|
/>
|
||||||
<input type="submit"
|
<input type="submit"
|
||||||
value="Verstuur"
|
value="Verstuur"
|
||||||
>
|
/>
|
||||||
<span>
|
<span>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
name="message"
|
name="content"
|
||||||
|
id="newContent"
|
||||||
placeholder="Reageer..."
|
placeholder="Reageer..."
|
||||||
|
autofocus
|
||||||
required
|
required
|
||||||
>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -17,4 +17,4 @@
|
|||||||
|
|
||||||
include_once("../queries/connect.php");
|
include_once("../queries/connect.php");
|
||||||
|
|
||||||
?>
|
session_start();
|
||||||
|
|||||||
@@ -1,256 +1,51 @@
|
|||||||
<?php
|
|
||||||
// define variables and set to empty values
|
|
||||||
$name = $surname = $bday = $username = $password = $confirmpassword = $streetname = $housenumber = $email = "";
|
|
||||||
$passwordErr = $confirmpasswordErr = "";
|
|
||||||
$correct = true;
|
|
||||||
|
|
||||||
if (isset($_POST["name"])) {
|
|
||||||
$name = $_POST["name"];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($_POST["surname"])) {
|
|
||||||
$surname = $_POST["surname"];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($_POST["bday"])) {
|
|
||||||
$bday = $_POST["bday"];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($_POST["username"])) {
|
|
||||||
$username = $_POST["username"];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($_POST["password"])) {
|
|
||||||
$password = $_POST["password"];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($_POST["streetname"])) {
|
|
||||||
$streetname = $_POST["streetname"];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($_POST["housenumber"])) {
|
|
||||||
$housenumber = $_POST["housenumber"];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($_POST["email"])) {
|
|
||||||
$email = $_POST["email"];
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
|
||||||
if ($_POST["password"]!= $_POST["confirmpassword"]) {
|
|
||||||
$passwordErr = "Wachtwoorden matchen niet";
|
|
||||||
$confirmpasswordErr = "Wachtwoorden matchen niet";
|
|
||||||
$correct = false;
|
|
||||||
?>
|
|
||||||
<script>window.onload = function() {
|
|
||||||
document.getElementById('id01').style.display='block'
|
|
||||||
}</script>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<div>
|
<div>
|
||||||
<img style="width:50%;margin-left:25%"
|
<img style="width:50%;margin-left:25%"
|
||||||
src="img/top-logo.png"
|
src="img/top-logo.png"
|
||||||
alt="MyHyvesbook+">
|
alt="MyHyvesbook+">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form action="../profile.php"
|
<!-- Login content -->
|
||||||
|
<form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"
|
||||||
|
return= $correct
|
||||||
method="post">
|
method="post">
|
||||||
<h1>Welkom bij MyHyvesbook+</h1>
|
<h1>Welkom bij MyHyvesbook+</h1>
|
||||||
|
|
||||||
|
<!-- Login name -->
|
||||||
<div class="login_containerlogin">
|
<div class="login_containerlogin">
|
||||||
<label><b>Gebruikersnaam</b></label>
|
<label><b>Gebruikersnaam</b></label>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
placeholder="Voer uw gebruikersnaam in"
|
placeholder="Voer uw gebruikersnaam in"
|
||||||
name="uname"
|
name="uname"
|
||||||
pattern=".{6,}"
|
value="<?php echo $uname ?>"
|
||||||
title="Moet 6 of meer karakters bevatten"
|
title="Moet 6 of meer karakters bevatten"
|
||||||
required>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Login password -->
|
||||||
<div class="login_containerlogin">
|
<div class="login_containerlogin">
|
||||||
<label><b>Wachtwoord</b></label>
|
<label><b>Wachtwoord</b></label>
|
||||||
<input type="password"
|
<input type="password"
|
||||||
placeholder="Voer uw wachtwoord in"
|
placeholder="Voer uw wachtwoord in"
|
||||||
name="psw"
|
name="psw"
|
||||||
pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}"
|
title="Moet minstens 8 karakters lang zijn"
|
||||||
title="Moet minimaal 1 cijfer, hoofdletter en kleine letter bevatten en minstens 8 karakters lang zijn"
|
>
|
||||||
required>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Error message -->
|
||||||
|
<div class="login_containerfault"><span><?php echo $loginErr; ?></span></div>
|
||||||
|
|
||||||
|
<!-- Button for logging in -->
|
||||||
<div class="login_containerlogin">
|
<div class="login_containerlogin">
|
||||||
<input type="submit"
|
<button type="submit"
|
||||||
value="Login"
|
value="Login"
|
||||||
name="Submit"
|
name="submit"
|
||||||
id="frm1_submit" />
|
id="frm1_submit">
|
||||||
|
Login
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<!-- Button for going to the register screen -->
|
||||||
<div class="login_containerlogin">
|
<div class="login_containerlogin">
|
||||||
<button onclick="document.getElementById('id01').style.display='block'">Registreer</button>
|
<a href="https://myhyvesbookplus.nl/~joey/public/register.php" class="button">Registreer een account</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="login_containerregister">
|
|
||||||
<div id="id01" class="modal">
|
|
||||||
<span onclick="document.getElementById('id01').style.display='none'"
|
|
||||||
class="close"
|
|
||||||
title="Close Modal">
|
|
||||||
×</span>
|
|
||||||
|
|
||||||
<!-- Register Content -->
|
|
||||||
<form class="modal-content animate"
|
|
||||||
action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"
|
|
||||||
return= $correct
|
|
||||||
method="post">
|
|
||||||
<h2>Registreer uw account</h2>
|
|
||||||
|
|
||||||
<div class="login_containerregister">
|
|
||||||
<label><b>Naam</b></label>
|
|
||||||
<input type="text"
|
|
||||||
placeholder="Voer uw naam in"
|
|
||||||
name="name"
|
|
||||||
value="<?php echo $name ?>"
|
|
||||||
pattern="[A-Za-z]{1,}"
|
|
||||||
title="Mag alleen letters bevatten"
|
|
||||||
required>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="login_containerregister">
|
|
||||||
<label><b>Achternaam</b></label>
|
|
||||||
<input type="text"
|
|
||||||
placeholder="Voer uw achternaam in"
|
|
||||||
name="surname"
|
|
||||||
value="<?php echo $surname ?>"
|
|
||||||
pattern="[A-Za-z]{1,}"
|
|
||||||
title="Mag alleen letters bevatten"
|
|
||||||
required>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="login_containerregister">
|
|
||||||
<label><b>Geboortedatum</b></label>
|
|
||||||
<input type="date"
|
|
||||||
name="bday"
|
|
||||||
value="<?php echo $bday ?>"
|
|
||||||
id="bday"
|
|
||||||
placeholder="01/01/1900">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="login_containerregister">
|
|
||||||
<label><b>Gebruikersnaam</b></label>
|
|
||||||
<input type="text"
|
|
||||||
placeholder="Voer uw gebruikersnaam in"
|
|
||||||
name="username"
|
|
||||||
value="<?php echo $username ?>"
|
|
||||||
pattern=".{6,}"
|
|
||||||
title="Moet minstens 6 karakters bevatten"
|
|
||||||
required>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Minstens 6 karakters</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<div class="login_containerregister">
|
|
||||||
<label><b>Wachtwoord</b></label>
|
|
||||||
<input type="password"
|
|
||||||
placeholder="Voer uw wachtwoord in"
|
|
||||||
name="password"
|
|
||||||
value="<?php echo $password ?>"
|
|
||||||
pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}"
|
|
||||||
id="password"
|
|
||||||
title="Moet minimaal 1 cijfer, hoofdletter en kleine letter bevatten en minstens 8 karakters bevatten"
|
|
||||||
required>
|
|
||||||
<span class="error">* <?php echo $passwordErr;?></span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li>Minstens 8 karakters</li>
|
|
||||||
<li>Minimaal 1 cijfer</li>
|
|
||||||
<li>Minimaal 1 hoofdletter</li>
|
|
||||||
<li>Minimaal 1 kleine letter</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<div class="login_containerregister">
|
|
||||||
<label><b>Herhaal wachtwoord</b></label>
|
|
||||||
<input type="password"
|
|
||||||
placeholder="Herhaal wachtwoord"
|
|
||||||
name="confirmpassword"
|
|
||||||
value="<?php echo $confirmpassword ?>"
|
|
||||||
pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}"
|
|
||||||
id="confirmpassword"
|
|
||||||
title="Herhaal wachtwoord"
|
|
||||||
required>
|
|
||||||
<span class="error">* <?php echo $confirmpasswordErr;?></span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="login_containerregister">
|
|
||||||
<label><b>Straatnaam</b></label>
|
|
||||||
<input type="text"
|
|
||||||
placeholder="Voer uw straatnaam in"
|
|
||||||
name="streetname"
|
|
||||||
value="<?php echo $streetname ?>"
|
|
||||||
pattern="[A-Za-z]{1,}"
|
|
||||||
title="Mag alleen letters bevatten"
|
|
||||||
required>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="login_containerregister">
|
|
||||||
<label><b>Huisnummer</b></label>
|
|
||||||
<input type="text"
|
|
||||||
placeholder="Voer uw straatnummer in"
|
|
||||||
name="housenumber"
|
|
||||||
value="<?php echo $housenumber ?>"
|
|
||||||
pattern="[1-9][0-9]{0,}"
|
|
||||||
title="Mag alleen nummers bevatten"
|
|
||||||
required>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="login_containerregister">
|
|
||||||
<label><b>Email</b></label>
|
|
||||||
<input type="email"
|
|
||||||
placeholder="Voer uw email in"
|
|
||||||
name="email"
|
|
||||||
value="<?php echo $email ?>"
|
|
||||||
id="email"
|
|
||||||
title="Voer een geldige email in"
|
|
||||||
required>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="login_containerregister">
|
|
||||||
<input type="submit"
|
|
||||||
value="Registreer uw account"
|
|
||||||
name="Submit"
|
|
||||||
id="frm1_submit" />
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
// Get the modal
|
|
||||||
var modal = document.getElementById('id01');
|
|
||||||
// When the user clicks anywhere outside of the modal, close it
|
|
||||||
window.onclick = function(event) {
|
|
||||||
if (event.target == modal) {
|
|
||||||
modal.style.display = "none";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
function passwordfunction() {
|
|
||||||
var password1 = document.getElementById("password").value;
|
|
||||||
var password2 = document.getElementById("confirmpassword").value;
|
|
||||||
var passwordmatching = false;
|
|
||||||
|
|
||||||
if (password1 == password2) {
|
|
||||||
document.getElementById("password").style.borderColor = "red";
|
|
||||||
document.getElementById("confirmpassword").style.borderColor = "red";
|
|
||||||
confirmpassword.setCustomValidity("Wachtwoorden matchen niet")
|
|
||||||
} else {
|
|
||||||
passwordmatching = true;
|
|
||||||
}
|
|
||||||
return passwordmatching;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|||||||
@@ -5,6 +5,4 @@
|
|||||||
type="text/css"
|
type="text/css"
|
||||||
href="styles/index.css">
|
href="styles/index.css">
|
||||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
|
||||||
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
|
|
||||||
<script src="js/dobPicker.min.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
135
website/views/register-view.php
Normal file
135
website/views/register-view.php
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
<div>
|
||||||
|
<img style="width:50%;margin-left:25%"
|
||||||
|
src="img/top-logo.png"
|
||||||
|
alt="MyHyvesbook+">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Register Content -->
|
||||||
|
<form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"
|
||||||
|
return= $correct
|
||||||
|
method="post">
|
||||||
|
<h2>Registreer uw account</h2>
|
||||||
|
|
||||||
|
<!-- Error message -->
|
||||||
|
<div class="login_containerfault"><?php echo $genericErr;?></span></div>
|
||||||
|
|
||||||
|
<!-- Register name -->
|
||||||
|
<div class="login_containerregister">
|
||||||
|
<label><b>Naam</b></label>
|
||||||
|
<input type="text"
|
||||||
|
placeholder="Voer uw naam in"
|
||||||
|
name="name"
|
||||||
|
value="<?php echo $name ?>"
|
||||||
|
title="Mag alleen letters bevatten"
|
||||||
|
>
|
||||||
|
<span class="error">* <?php echo $nameErr;?></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Register surname -->
|
||||||
|
<div class="login_containerregister">
|
||||||
|
<label><b>Achternaam</b></label>
|
||||||
|
<input type="text"
|
||||||
|
placeholder="Voer uw achternaam in"
|
||||||
|
name="surname"
|
||||||
|
value="<?php echo $surname ?>"
|
||||||
|
title="Mag alleen letters bevatten"
|
||||||
|
>
|
||||||
|
<span class="error">* <?php echo $surnameErr;?></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Register birthday -->
|
||||||
|
<div class="login_containerregister">
|
||||||
|
<label><b>Geboortedatum</b></label>
|
||||||
|
<input type="date"
|
||||||
|
name="bday"
|
||||||
|
value="<?php echo $bday ?>"
|
||||||
|
id="bday"
|
||||||
|
placeholder="01/01/1900"
|
||||||
|
>
|
||||||
|
<span class="error">* <?php echo $bdayErr;?></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Register username -->
|
||||||
|
<div class="login_containerregister">
|
||||||
|
<label><b>Gebruikersnaam</b></label>
|
||||||
|
<input type="text"
|
||||||
|
placeholder="Voer uw gebruikersnaam in"
|
||||||
|
name="username"
|
||||||
|
value="<?php echo $username ?>"
|
||||||
|
title="Moet minimaal 6 karakters bevatten"
|
||||||
|
>
|
||||||
|
<span class="error">* <?php echo $usernameErr;?></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>Minstens 6 karakters</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<!-- Register password -->
|
||||||
|
<div class="login_containerregister">
|
||||||
|
<label><b>Wachtwoord</b></label>
|
||||||
|
<input type="password"
|
||||||
|
placeholder="Voer uw wachtwoord in"
|
||||||
|
name="password"
|
||||||
|
value="<?php echo $password ?>"
|
||||||
|
id="password"
|
||||||
|
>
|
||||||
|
<span class="error">* <?php echo $passwordErr;?></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>Minstens 8 karakters</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<!-- Repeat password -->
|
||||||
|
<div class="login_containerregister">
|
||||||
|
<label><b>Herhaal wachtwoord</b></label>
|
||||||
|
<input type="password"
|
||||||
|
placeholder="Herhaal wachtwoord"
|
||||||
|
name="confirmpassword"
|
||||||
|
value="<?php echo $confirmpassword ?>"
|
||||||
|
id="confirmpassword"
|
||||||
|
title="Herhaal wachtwoord"
|
||||||
|
>
|
||||||
|
<span class="error">* <?php echo $confirmpasswordErr;?></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Register location -->
|
||||||
|
<div class="login_containerregister">
|
||||||
|
<label><b>Woonplaats</b></label>
|
||||||
|
<input type="text"
|
||||||
|
placeholder="Voer uw woonplaats in"
|
||||||
|
name="location"
|
||||||
|
value="<?php echo $location ?>"
|
||||||
|
pattern="[A-Za-z]{1,}"
|
||||||
|
title="Mag alleen letters bevatten">
|
||||||
|
<span class="error">* <?php echo $locationErr;?></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Register email -->
|
||||||
|
<div class="login_containerregister">
|
||||||
|
<label><b>Email</b></label>
|
||||||
|
<input type="email"
|
||||||
|
placeholder="Voer uw email in"
|
||||||
|
name="email"
|
||||||
|
value="<?php echo $email ?>"
|
||||||
|
id="email"
|
||||||
|
title="Voer een geldige email in">
|
||||||
|
<span class="error">* <?php echo $emailErr;?></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Button for registering -->
|
||||||
|
<div class="login_containerregister">
|
||||||
|
<button type="submit"
|
||||||
|
value="Registreer uw account"
|
||||||
|
name="Submit"
|
||||||
|
id="frm1_submit">
|
||||||
|
Registreer uw account
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<!-- Button for going back to login screen -->
|
||||||
|
<div class="login_containerlogin">
|
||||||
|
<a href="https://myhyvesbookplus.nl/~joey/public/login.php" class="button">Login met een account</a>
|
||||||
|
</div>
|
||||||
@@ -1,39 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
$settings = getSettings();
|
||||||
|
?>
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="settings">
|
<div class="settings">
|
||||||
<form class="settings-profile platform">
|
<?php
|
||||||
|
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||||
|
echo "<div class='platform settings-message ${result["type"]}'>
|
||||||
|
${result["message"]}
|
||||||
|
</div>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<form class="settings-profile platform" method="post">
|
||||||
<h5>Profiel Instellingen</h5>
|
<h5>Profiel Instellingen</h5>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<label for="first-name">Voornaam</label>
|
<label for="fname">Voornaam</label>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
name="first-name"
|
name="fname"
|
||||||
id="first-name"
|
id="fname"
|
||||||
placeholder="Voornaam"
|
placeholder="Voornaam"
|
||||||
title="Voornaam"
|
title="Voornaam"
|
||||||
|
value="<?= $settings["fname"]?>"
|
||||||
>
|
>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label for="last-name">Achternaam</label>
|
<label for="lname">Achternaam</label>
|
||||||
<input type="text"
|
<input type="text"
|
||||||
name="last-name"
|
name="lname"
|
||||||
id="last-name"
|
id="lname"
|
||||||
placeholder="Achternaam"
|
placeholder="Achternaam"
|
||||||
>
|
value="<?= $settings["lname"]?>"
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<label for="place">Woonplaats</label>
|
|
||||||
<input type="text"
|
|
||||||
name="place"
|
|
||||||
id="place"
|
|
||||||
placeholder="Woonplaats"
|
|
||||||
>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<label for="bday">Geboortedatum</label>
|
|
||||||
<input type="date"
|
|
||||||
name="bday"
|
|
||||||
id="bday"
|
|
||||||
placeholder="01/01/1900"
|
|
||||||
>
|
>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
@@ -42,6 +39,16 @@
|
|||||||
name="location"
|
name="location"
|
||||||
id="location"
|
id="location"
|
||||||
placeholder="Locatie"
|
placeholder="Locatie"
|
||||||
|
value="<?= $settings["location"]?>"
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label for="bday">Geboortedatum</label>
|
||||||
|
<input type="date"
|
||||||
|
name="bday"
|
||||||
|
id="bday"
|
||||||
|
placeholder="yyyy-mm-dd"
|
||||||
|
value="<?= $settings["birthdate"]?>"
|
||||||
>
|
>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
@@ -50,17 +57,42 @@
|
|||||||
rows="5"
|
rows="5"
|
||||||
title="bio"
|
title="bio"
|
||||||
id="bio"
|
id="bio"
|
||||||
></textarea>
|
><?= $settings["bio"]?></textarea>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label></label>
|
<label></label>
|
||||||
<input type="submit"
|
<button type="submit"
|
||||||
value="Opslaan"
|
value="profile"
|
||||||
>
|
name="form"
|
||||||
|
>Opslaan</button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</form>
|
||||||
|
<form class="settings-profilepictue platform" method="post">
|
||||||
|
<h5>Verander profielfoto</h5>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<label>Huidige profielfoto</label>
|
||||||
|
<img src="<?= $settings["profilepicture"] ?>"
|
||||||
|
class="profile-picture"
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label>Selecteer foto</label>
|
||||||
|
<input type="file"
|
||||||
|
name="pp"
|
||||||
|
accept="image/jpeg,image/gif,image/png"
|
||||||
|
>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label></label>
|
||||||
|
<button type="submit"
|
||||||
|
name="form"
|
||||||
|
value="picture"
|
||||||
|
>Verander profielfoto</button>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<form class="settings-password platform item-box" method="post">
|
<form class="settings-password platform item-box" method="post">
|
||||||
<h5>Verander Wachtwoord</h5>
|
<h5>Verander Wachtwoord</h5>
|
||||||
<ul>
|
<ul>
|
||||||
@@ -86,10 +118,10 @@
|
|||||||
>
|
>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label></label>
|
<button type="submit"
|
||||||
<input type="submit"
|
name="form"
|
||||||
value="Verander wachtwoord"
|
value="password"
|
||||||
>
|
>Verander wachtwoord</button>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</form>
|
</form>
|
||||||
@@ -97,6 +129,14 @@
|
|||||||
<form class="settings-email platform item-box" method="post">
|
<form class="settings-email platform item-box" method="post">
|
||||||
<h5>Verander Email</h5>
|
<h5>Verander Email</h5>
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>
|
||||||
|
<label for="email-old">Huidig Email </label>
|
||||||
|
<input type="email"
|
||||||
|
id="email-old"
|
||||||
|
value="<?= $settings["email"]?>"
|
||||||
|
disabled
|
||||||
|
>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label for="email">Nieuw Email</label>
|
<label for="email">Nieuw Email</label>
|
||||||
<input type="email"
|
<input type="email"
|
||||||
@@ -114,10 +154,10 @@
|
|||||||
>
|
>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<label></label>
|
<button type="submit"
|
||||||
<input type="submit"
|
name="form"
|
||||||
value="Verander Email"
|
value="email"
|
||||||
>
|
>Verander Email</button>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
Reference in New Issue
Block a user