Merge branch 'master' into marijn-button
This commit is contained in:
12
website/public/.htaccess
Normal file
12
website/public/.htaccess
Normal file
@@ -0,0 +1,12 @@
|
||||
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 ^profile/([A-z0-9]+)$ profile.php?username=$1 [NC]
|
||||
13
website/public/API/loadMessages.php
Normal file
13
website/public/API/loadMessages.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
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(test_input($_POST["lastID"]), test_input($_POST["destination"]));
|
||||
} else {
|
||||
echo getOldChatMessages(test_input($_POST["destination"]));
|
||||
}
|
||||
8
website/public/API/loadNotifications.php
Normal file
8
website/public/API/loadNotifications.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
session_start();
|
||||
|
||||
require_once ("../../queries/connect.php");
|
||||
require_once ("../../queries/friendship.php");
|
||||
|
||||
echo selectAllFriendRequests();
|
||||
17
website/public/API/sendMessage.php
Normal file
17
website/public/API/sendMessage.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
session_start();
|
||||
require_once("../../queries/connect.php");
|
||||
require_once("../../queries/private_message.php");
|
||||
require_once("../../queries/checkInput.php");
|
||||
|
||||
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 0;
|
||||
}
|
||||
} else {
|
||||
echo 0;
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
<style>
|
||||
@import url("styles/chat.css");
|
||||
</style>
|
||||
<script src="js/chat.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
|
||||
BIN
website/public/img/error404.jpg
Normal file
BIN
website/public/img/error404.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
44
website/public/js/admin.js
Normal file
44
website/public/js/admin.js
Normal file
@@ -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';
|
||||
}
|
||||
}
|
||||
62
website/public/js/chat.js
Normal file
62
website/public/js/chat.js
Normal file
@@ -0,0 +1,62 @@
|
||||
$(document).ready(function() {
|
||||
loadMessages();
|
||||
sayEmpty();
|
||||
$(".chat-field").hide();
|
||||
});
|
||||
|
||||
function loadMessages() {
|
||||
$.post(
|
||||
"API/loadMessages.php",
|
||||
$("#lastIDForm").serialize()
|
||||
).done(function(data) {
|
||||
if (data && data != "[]") {
|
||||
messages = JSON.parse(data);
|
||||
addMessages(messages);
|
||||
$("#lastID").val(messages[messages.length - 1].messageID);
|
||||
$("#chat-history").scrollTop($("#chat-history")[0].scrollHeight);
|
||||
}
|
||||
});
|
||||
|
||||
setTimeout(loadMessages, 1000);
|
||||
}
|
||||
|
||||
|
||||
function sendMessage() {
|
||||
$.post(
|
||||
"API/sendMessage.php",
|
||||
$("#sendMessageForm").serialize()
|
||||
);
|
||||
|
||||
$("#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) {
|
||||
$(".chat-field").show();
|
||||
$(".destinationID").val(userID);
|
||||
$("#chat-history").html("");
|
||||
$("#lastID").val("");
|
||||
$(".chat-left .friend-item").removeClass("active-friend-chat");
|
||||
$(".chat-left #friend-item-" + userID).addClass("active-friend-chat");
|
||||
}
|
||||
|
||||
function sayEmpty() {
|
||||
$("#chat-history").html("Begin nu met chatten!");
|
||||
}
|
||||
@@ -1,7 +1,33 @@
|
||||
$(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);
|
||||
$(".chat-right").animate({
|
||||
width: "100%"
|
||||
}, 500);
|
||||
$("#notification-center").animate({
|
||||
right: "0px"
|
||||
}, 500);
|
||||
} else {
|
||||
$(".chat-right").animate({
|
||||
width: "100%"
|
||||
}, 500);
|
||||
$(".content").animate({
|
||||
marginRight: "0px"
|
||||
}, 500);
|
||||
$("#notification-center").animate({
|
||||
right: "-256px"
|
||||
}, 500);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -6,7 +6,7 @@ $(document).ready(function() {
|
||||
$("#more-friends-click").click(function() {
|
||||
// Show only friends
|
||||
$("#groups-menu-section").slideUp();
|
||||
$("#friends-menu-section a").show();
|
||||
$("#friends-menu-section li").show();
|
||||
|
||||
// Change buttons
|
||||
$("#more-friends-click").hide();
|
||||
@@ -17,7 +17,7 @@ $(document).ready(function() {
|
||||
$("#more-groups-click").click(function() {
|
||||
// Show only groups
|
||||
$("#friends-menu-section").slideUp();
|
||||
$("#groups-menu-section a").show();
|
||||
$("#groups-menu-section li").show();
|
||||
|
||||
// Change buttons
|
||||
$("#more-groups-click").hide();
|
||||
|
||||
34
website/public/js/notifications.js
Normal file
34
website/public/js/notifications.js
Normal file
@@ -0,0 +1,34 @@
|
||||
function showNotifications(notifications, id) {
|
||||
$("#friendrequestslist").html("");
|
||||
for (i in notifications) {
|
||||
$("#friendrequestslist").append(" \
|
||||
<li class='friend-item $extraItem'> \
|
||||
<form action='profile.php' method='get'> \
|
||||
<button type='submit' \
|
||||
name='username' \
|
||||
value='"+ notifications[i].username +"'> \
|
||||
<div class='friend'> \
|
||||
<img alt='PF' class='profile-picture' src='"+ notifications[i].profilepicture +"'/> \
|
||||
"+ notifications[i].username +" \
|
||||
</div> \
|
||||
</button> \
|
||||
</form> \
|
||||
</li> \
|
||||
");
|
||||
}
|
||||
}
|
||||
|
||||
function loadNotifications() {
|
||||
$.post(
|
||||
"API/loadNotifications.php"
|
||||
).done(function(data) {
|
||||
if (data && data != "[]") {
|
||||
showNotifications(JSON.parse(data), "friendrequestslist");
|
||||
}
|
||||
});
|
||||
|
||||
setTimeout(loadNotifications, 10000);
|
||||
}
|
||||
|
||||
loadNotifications();
|
||||
|
||||
8
website/public/js/registerAndLogin.js
Normal file
8
website/public/js/registerAndLogin.js
Normal file
@@ -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.location.href = "profile.php";
|
||||
}
|
||||
document.getElementById("demo").innerHTML = x;
|
||||
}
|
||||
@@ -2,13 +2,20 @@
|
||||
<html>
|
||||
<?php
|
||||
include("../views/login_head.php");
|
||||
include_once("../queries/connect.php");
|
||||
require_once("../queries/connect.php");
|
||||
include_once("../queries/login.php");
|
||||
include_once("../queries/checkInput.php");
|
||||
?>
|
||||
<body>
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
if(isset($_SESSION["userID"])){
|
||||
echo "<script>
|
||||
window.onload=checkLoggedIn();
|
||||
</script>";
|
||||
}
|
||||
|
||||
// Define variables and set to empty values
|
||||
$uname = $psw ="";
|
||||
$loginErr ="";
|
||||
@@ -21,15 +28,15 @@
|
||||
|
||||
}
|
||||
else {
|
||||
$uname=strtolower($_POST["uname"]);
|
||||
$psw=$_POST["psw"];
|
||||
$hash=hashPassword()["password"];
|
||||
$userid=hashPassword()["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.$uname, $hash)) {
|
||||
if(password_verify($psw, $hash)) {
|
||||
$_SESSION["userID"] = $userid;
|
||||
header("location: /profile.php");
|
||||
header("location: profile.php");
|
||||
|
||||
} else {
|
||||
$loginErr = "Inloggegevens zijn niet correct";
|
||||
|
||||
15
website/public/logout.php
Normal file
15
website/public/logout.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<?php
|
||||
include("../views/login_head.php");
|
||||
require_once("../queries/connect.php");
|
||||
include_once("../queries/login.php");
|
||||
?>
|
||||
<body>
|
||||
<?php
|
||||
session_start();
|
||||
unset($_SESSION["userID"]);
|
||||
header("Location: login.php");
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
@@ -2,12 +2,28 @@
|
||||
<html>
|
||||
<head>
|
||||
<?php include("../views/head.php"); ?>
|
||||
<script src="/js/masonry.js"></script>
|
||||
<style>
|
||||
@import url("styles/profile.css");
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
include("../queries/user.php");
|
||||
include("../queries/friendship.php");
|
||||
include("../queries/nicetime.php");
|
||||
|
||||
if(empty($_GET["username"])) {
|
||||
$userID = $_SESSION["userID"];
|
||||
} else {
|
||||
$userID = getUserID($_GET["username"]);
|
||||
}
|
||||
|
||||
$user = selectUser($userID);
|
||||
$profile_friends = selectAllFriends($userID);
|
||||
$profile_groups = selectAllUserGroups($userID);
|
||||
$posts = selectAllUserPosts($userID);
|
||||
|
||||
/*
|
||||
* This view adds the main layout over the screen.
|
||||
* Header, menu, footer.
|
||||
|
||||
@@ -2,162 +2,42 @@
|
||||
<html>
|
||||
<?php
|
||||
include("../views/login_head.php");
|
||||
include_once("../queries/connect.php");
|
||||
require_once("../queries/connect.php");
|
||||
include_once("../queries/register.php");
|
||||
|
||||
include_once("../queries/checkInput.php");
|
||||
?>
|
||||
<body>
|
||||
<?php
|
||||
session_start();
|
||||
|
||||
if(isset($_SESSION["userID"])){
|
||||
header("location: profile.php");
|
||||
}
|
||||
// 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;
|
||||
checkInputChoice("name", "lettersAndSpace");
|
||||
checkInputChoice("surname", "lettersAndSpace");
|
||||
|
||||
} 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;
|
||||
|
||||
}
|
||||
$bday = test_input($_POST["bday"]);
|
||||
}
|
||||
|
||||
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");
|
||||
|
||||
}
|
||||
checkInputChoice("username", "username");
|
||||
checkInputChoice("password", "longerEight");
|
||||
checkInputChoice("confirmpassword", "");
|
||||
matchPassword();
|
||||
checkInputChoice("location", "lettersAndSpace");
|
||||
checkInputChoice("email", "email");
|
||||
registerCheck();
|
||||
}
|
||||
|
||||
/* This view adds register view */
|
||||
include("../views/register-view.php");
|
||||
?>
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<?php include("../views/head.php"); ?>
|
||||
<?php
|
||||
include_once("../queries/user.php");
|
||||
include_once("../queries/group_page.php");
|
||||
include("../views/head.php");
|
||||
?>
|
||||
<style>
|
||||
@import url("styles/search.css");
|
||||
</style>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<?php
|
||||
|
||||
include("../views/main.php");
|
||||
$notImplemented = new settingsMessage("angry", "Deze functie werkt nog niet :(");
|
||||
|
||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
switch ($_POST["form"]) {
|
||||
@@ -21,19 +22,14 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
$result = updateSettings();
|
||||
break;
|
||||
case "password":
|
||||
$result = updatePassword();
|
||||
$result = changePassword();
|
||||
break;
|
||||
case "email":
|
||||
$result = array (
|
||||
"type" => "settings-message-angry",
|
||||
"message" => "Deze functie werkt nog niet :("
|
||||
);
|
||||
$result = changeEmail();
|
||||
break;
|
||||
case "picture":
|
||||
$result = array (
|
||||
"type" => "settings-message-angry",
|
||||
"message" => "Deze functie werkt nog niet :("
|
||||
);
|
||||
updateProfilePicture();
|
||||
$result = new settingsMessage("happy", "Deze melding doet nog niks nuttigs.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,22 +6,26 @@
|
||||
.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"] {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.admin-actions {
|
||||
.admin-batchactions, .admin-groupbatchactions {
|
||||
display: inline-block;
|
||||
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);
|
||||
}
|
||||
|
||||
.admin-searchform {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.admin-searchbar {
|
||||
display: inline-block;
|
||||
margin: 10px;
|
||||
@@ -32,17 +36,38 @@
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.admin-filter {
|
||||
.admin-filter, .admin-filtertype, .admin-groupfilter {
|
||||
display: inline-block;
|
||||
margin: 10px;
|
||||
vertical-align: top;
|
||||
margin-right: 100px;
|
||||
margin-right: 50px;
|
||||
margin-left: 50px;
|
||||
}
|
||||
|
||||
.admin-filter, .admin-groupfilter {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.admin-users {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.admin-userheading {
|
||||
width: auto;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.admin-pageui {
|
||||
text-align: right;
|
||||
float: right;
|
||||
width: auto;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.usertitle {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.usertable {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@@ -83,9 +83,14 @@
|
||||
.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;
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
|
||||
}
|
||||
|
||||
.active-friend-chat {
|
||||
background: aquamarine;
|
||||
color: #333;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,32 +35,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;
|
||||
}
|
||||
|
||||
@@ -1,23 +1,7 @@
|
||||
::selection {
|
||||
background: #845663;
|
||||
color: white;
|
||||
}
|
||||
|
||||
::-moz-selection {
|
||||
background: #845663;
|
||||
color: white;
|
||||
}
|
||||
|
||||
a, a:link, a:visited, a:hover, a:active {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a.button {
|
||||
background-color: #845663;
|
||||
border: 2px solid black;
|
||||
border-radius: 12px;
|
||||
color: white;
|
||||
background-color: #C8CABD;
|
||||
border-radius: 10px;
|
||||
color: black;
|
||||
cursor: pointer;
|
||||
height: 50%;
|
||||
margin: 8px 0;
|
||||
@@ -27,64 +11,19 @@ a.button {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
a[data-title]:hover:after, img[data-title]:hover:after, span[data-title]:hover:after,
|
||||
div[data-title]:hover:after{
|
||||
content: attr(data-title);
|
||||
padding: 4px 4px;
|
||||
color: #FFFFFF;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 100%;
|
||||
z-index: 20;
|
||||
white-space: nowrap;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
-moz-box-shadow: 0px 0px 4px #222;
|
||||
-webkit-box-shadow: 0px 0px 4px #222;
|
||||
box-shadow: 0px 0px 4px #222;
|
||||
background-color: #333;
|
||||
font-size: 15px;
|
||||
line-height: normal;
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
|
||||
/* Add Zoom Animation */
|
||||
.animate {
|
||||
animation: animatezoom 0.6s
|
||||
-webkit-animation: animatezoom 0.6s;
|
||||
}
|
||||
|
||||
/* Body */
|
||||
body {
|
||||
height: 900px;
|
||||
background-color: #C8CABD;
|
||||
/*background-image: url(http://play.pokemonshowdown.com/fx/client-bg-shaymin.jpg);
|
||||
background-size: cover;
|
||||
background-attachment: fixed;*/
|
||||
|
||||
background-image: url(https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTEnqKdVtLbxjKuNsCSCxFRhTOpp3Gm0gsU8bMgA_MeUYyzrUFy);
|
||||
background-size: contain;
|
||||
background-repeat: repeat-x;
|
||||
background-attachment: fixed;
|
||||
|
||||
/*background-color: #B78996;*/
|
||||
/*background-color: #EEE;*/
|
||||
color: #333;
|
||||
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
|
||||
/* stijl voor alle buttons */
|
||||
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;
|
||||
}
|
||||
|
||||
/* The Close Button */
|
||||
.close {
|
||||
/* Position it in the top right corner outside of the modal */
|
||||
@@ -106,20 +45,18 @@ button {
|
||||
/* inlogform */
|
||||
form {
|
||||
/*background-color: #a87a87;*/
|
||||
border: 5px solid #325da3;
|
||||
background-color: #a87a87;
|
||||
border-radius: 12px;
|
||||
height: 57%;
|
||||
margin: 8px auto;
|
||||
width: 45%;
|
||||
overflow: auto;
|
||||
height: 80%;
|
||||
margin: auto;
|
||||
width: 70%;
|
||||
overflow-y:auto;
|
||||
}
|
||||
|
||||
/* inlog titel */
|
||||
h1 {
|
||||
padding: 16px;
|
||||
padding: 8px;
|
||||
text-align: center;
|
||||
font-size: 2.2em;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
/* registreer titel*/
|
||||
@@ -129,37 +66,67 @@ h2 {
|
||||
font-size: 2.0em;
|
||||
}
|
||||
|
||||
|
||||
input[type=text], input[type=password], input[type=email], input[type="date"] {
|
||||
border-radius: 12px;
|
||||
border: 5px solid #ccc;
|
||||
box-sizing: border-box;
|
||||
border-color: #C8CABD;
|
||||
display: inline-block;
|
||||
height: 50%;
|
||||
padding: 12px 20px;
|
||||
margin: 8px 0;
|
||||
width: 50%;
|
||||
height: 60%;
|
||||
padding: 8px 20px;
|
||||
margin: 4px 0;
|
||||
width: 70%;
|
||||
}
|
||||
/*
|
||||
input[type=text], input[type=password], input[type=email], input[type="date"] {
|
||||
border: 0px;
|
||||
border-bottom: 4px solid lightgray;
|
||||
border-radius: 0px;
|
||||
}*/
|
||||
|
||||
button[type=submit] {
|
||||
background-color: #C8CABD;
|
||||
color: black ;
|
||||
cursor: pointer;
|
||||
font-family: Arial;
|
||||
font-size: 16px;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
input[type=submit] {
|
||||
background-color: #845663;
|
||||
border: 2px solid black;
|
||||
border-radius: 12px;
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
height: 50%;
|
||||
margin: 8px 0;
|
||||
padding: 14px 20px;
|
||||
width: 50%;
|
||||
.error {
|
||||
font-family: Arial;
|
||||
font-size: 16px;
|
||||
font-size: 15px;
|
||||
color: red;
|
||||
}
|
||||
|
||||
label {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.left-arrow {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
background-color: #C8CABD;
|
||||
height: 30px;
|
||||
width: 90px;
|
||||
padding: 3px 3px 3px 0px;
|
||||
text-align: center;
|
||||
border-radius: 0px 10px 10px 0px;
|
||||
font-size: 24px;
|
||||
|
||||
}
|
||||
.left-arrow:after {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
right: 100%;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
border-top: 15px solid transparent;
|
||||
border-right: 20px solid #C8CABD;
|
||||
border-bottom: 15px solid transparent;
|
||||
border-left: 0px solid transparent;
|
||||
}
|
||||
|
||||
/* padding voor registreer container */
|
||||
.login_containerregister {
|
||||
padding: 16px;
|
||||
@@ -168,7 +135,7 @@ label {
|
||||
|
||||
/* padding voor login_containers */
|
||||
.login_containerlogin {
|
||||
padding: 16px;
|
||||
padding:25px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@@ -179,52 +146,31 @@ label {
|
||||
color: red;
|
||||
}
|
||||
|
||||
/* The Modal (background) */
|
||||
.modal {
|
||||
background-color: rgb(0,0,0); /* Fallback color */
|
||||
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
|
||||
display: none; /* Hidden by default */
|
||||
height: 100%;
|
||||
left: 0;
|
||||
margin: auto;
|
||||
overflow: auto; /* Enable scroll if needed */
|
||||
padding-top: 60px;
|
||||
position: fixed; /* Stay in place */
|
||||
top: 0;
|
||||
width: 100%; /* Full width */
|
||||
z-index: 1; /* Sit on top */
|
||||
}
|
||||
|
||||
/* Modal Content/Box */
|
||||
.modal-content {
|
||||
background-color: #B78996;
|
||||
border: 5px solid #325da3;
|
||||
margin: 5px auto; /* 15% from the top and centered */
|
||||
overflow-y: auto;
|
||||
width: 40%; /* Could be more or less, depending on screen size */
|
||||
height: 60%;
|
||||
|
||||
}
|
||||
|
||||
@keyframes animatezoom {
|
||||
from {transform: scale(0)}
|
||||
to {transform: scale(1)}
|
||||
}
|
||||
|
||||
/* datepicker */
|
||||
select {
|
||||
border-radius: 12px;
|
||||
border: 5px solid #ccc;
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
height: 50%;
|
||||
padding: 12px 20px;
|
||||
margin: 8px 0;
|
||||
width: 18%;
|
||||
font-family: Arial;
|
||||
font-size: 16px;
|
||||
/* White boxes (squares) */
|
||||
.platform {
|
||||
background-color: #FFFFFF;
|
||||
/*background-image: url(http://www.planwallpaper.com/static/images/518071-background-hd_xO1TwRc.jpg);
|
||||
background-size: cover;
|
||||
background-repeat: repeat-x;
|
||||
background-attachment: fixed;*/
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
|
||||
height: 550px;
|
||||
margin: 34px auto;
|
||||
overflow-y: auto;
|
||||
padding: 20px;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
/*.platform {
|
||||
width: 40%;
|
||||
margin: 34px auto;
|
||||
}*/
|
||||
|
||||
@-webkit-keyframes animatezoom {
|
||||
from {-webkit-transform: scale(0)}
|
||||
to {-webkit-transform: scale(1)}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
.menu {
|
||||
position: fixed;
|
||||
z-index: 50;
|
||||
overflow-y: auto;
|
||||
|
||||
left: 0;
|
||||
top: 80px;
|
||||
height: calc(100% - 80px);
|
||||
width: 256px;
|
||||
|
||||
background-color: #EEE;
|
||||
/*box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);*/
|
||||
}
|
||||
|
||||
.menu section {
|
||||
margin: 0 5px 10px 5px;
|
||||
background-color: white;
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
|
||||
}
|
||||
@@ -25,3 +32,39 @@
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.friend-item, .group-item {
|
||||
cursor: pointer;
|
||||
transition-duration: 250ms;
|
||||
}
|
||||
|
||||
.friend-item:hover, .group-item:hover {
|
||||
background: #FBC02D;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.menu button {
|
||||
background: none;
|
||||
color: inherit;
|
||||
width: 100%;
|
||||
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: #4CAF50;
|
||||
font-size: 42px;
|
||||
padding: 7px;
|
||||
}
|
||||
@@ -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: 0 0 10px 0;
|
||||
}
|
||||
|
||||
div.posts {
|
||||
padding-top: 20px;
|
||||
@@ -25,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 {
|
||||
@@ -37,23 +49,18 @@ div.posts .post p.subscript {
|
||||
font-size: 8pt;
|
||||
}
|
||||
|
||||
/*.posts {*/
|
||||
/*z-index: -1;*/
|
||||
/*margin-right: 0;*/
|
||||
/*width: calc(100% + 15px);*/
|
||||
/*}*/
|
||||
div.posts .post form input, div.posts .post form textarea {
|
||||
width: calc(100% - 15px);
|
||||
}
|
||||
|
||||
/*.post-box {*/
|
||||
/*display: inline-flex;*/
|
||||
/*margin: 20px 15px 0 0;*/
|
||||
/*padding: 25px;*/
|
||||
/*background-color: #FFFFFF;*/
|
||||
/*}*/
|
||||
div.posts .post form input[type="submit"] {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/*!* fullscreen *!*/
|
||||
/*.post-box {*/
|
||||
/*width: calc(25% - 69px);*/
|
||||
/*}*/
|
||||
div.posts .post form textarea.newpost {
|
||||
margin: 15px 0 15px 0;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1500px) {
|
||||
.post-box {
|
||||
@@ -68,14 +75,6 @@ div.posts .post p.subscript {
|
||||
}
|
||||
}
|
||||
|
||||
.post {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.post img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.post .post-date {
|
||||
float: right;
|
||||
color: #aaaaaa;
|
||||
@@ -86,11 +85,12 @@ div.posts .post p.subscript {
|
||||
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);
|
||||
}
|
||||
@@ -9,4 +9,9 @@
|
||||
|
||||
#search-friends-output {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.searchleft, .searchright {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
@@ -7,7 +7,7 @@
|
||||
include_once("../queries/connect.php");
|
||||
include_once("../queries/friendship.php");
|
||||
|
||||
$friends = selectAllFriends($db, 666);
|
||||
$friends = selectAllFriends(666);
|
||||
while($friend = $friends->fetch(PDO::FETCH_ASSOC)) {
|
||||
echo $friend['username'].' '.$friend['onlinestatus'] . "<br />";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user