Merge branch 'master' into lars-algemeen
This commit is contained in:
BIN
website/public/external/nietslecht_button.png
vendored
BIN
website/public/external/nietslecht_button.png
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 65 KiB |
@@ -2,7 +2,7 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<?php
|
<?php
|
||||||
include("../views/head.php");
|
include_once("../views/head.php");
|
||||||
include_once("../queries/connect.php");
|
include_once("../queries/connect.php");
|
||||||
include_once("../queries/settings.php");
|
include_once("../queries/settings.php");
|
||||||
?>
|
?>
|
||||||
@@ -12,8 +12,6 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include("../views/main.php");
|
|
||||||
$notImplemented = new settingsMessage("angry", "Deze functie werkt nog niet :(");
|
$notImplemented = new settingsMessage("angry", "Deze functie werkt nog niet :(");
|
||||||
|
|
||||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||||
@@ -33,6 +31,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
include("../views/main.php");
|
||||||
|
|
||||||
include("../views/settings-view.php");
|
include("../views/settings-view.php");
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ a.button {
|
|||||||
|
|
||||||
/* Body */
|
/* Body */
|
||||||
body {
|
body {
|
||||||
height: 900px;
|
height: 100%;
|
||||||
background-color: #C8CABD;
|
background-color: #C8CABD;
|
||||||
/*background-image: url(http://play.pokemonshowdown.com/fx/client-bg-shaymin.jpg);
|
/*background-image: url(http://play.pokemonshowdown.com/fx/client-bg-shaymin.jpg);
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
@@ -46,7 +46,7 @@ body {
|
|||||||
form {
|
form {
|
||||||
/*background-color: #a87a87;*/
|
/*background-color: #a87a87;*/
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
height: 80%;
|
height: 70%;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
width: 70%;
|
width: 70%;
|
||||||
overflow-y:auto;
|
overflow-y:auto;
|
||||||
@@ -159,7 +159,7 @@ label {
|
|||||||
background-repeat: repeat-x;
|
background-repeat: repeat-x;
|
||||||
background-attachment: fixed;*/
|
background-attachment: fixed;*/
|
||||||
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
|
box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
|
||||||
height: 550px;
|
height: 500px;
|
||||||
margin: 34px auto;
|
margin: 34px auto;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
|
|||||||
@@ -188,15 +188,25 @@ function doChangeEmail($email) {
|
|||||||
function updateProfilePicture() {
|
function updateProfilePicture() {
|
||||||
$profilePictureDir = "/var/www/html/public/";
|
$profilePictureDir = "/var/www/html/public/";
|
||||||
$relativePath = "uploads/profilepictures/" . $_SESSION["userID"] . "_" . basename($_FILES["pp"]["name"]);
|
$relativePath = "uploads/profilepictures/" . $_SESSION["userID"] . "_" . basename($_FILES["pp"]["name"]);
|
||||||
// removeOldProfilePicture();
|
removeOldProfilePicture();
|
||||||
move_uploaded_file($_FILES['pp']['tmp_name'], $profilePictureDir . $relativePath);
|
move_uploaded_file($_FILES['pp']['tmp_name'], $profilePictureDir . $relativePath);
|
||||||
setProfilePictureToDatabase("../" . $relativePath);
|
setProfilePictureToDatabase("../" . $relativePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
//function removeOldProfilePicture() {
|
function removeOldProfilePicture() {
|
||||||
//
|
$stmt = $GLOBALS["db"]->prepare("
|
||||||
// unlink("/var/www/html/public/uploads/profilepictures/" . $_SESSION["userID"] . "_*");
|
SELECT
|
||||||
//}
|
`profilepicture`
|
||||||
|
FROM
|
||||||
|
`user`
|
||||||
|
WHERE
|
||||||
|
`userID` = :userID
|
||||||
|
");
|
||||||
|
$stmt->bindParam(":userID", $_SESSION["userID"]);
|
||||||
|
$stmt->execute();
|
||||||
|
$old_avatar = $stmt->fetch()["profilepicture"];
|
||||||
|
unlink("/var/www/html/public/uploads/" . $old_avatar);
|
||||||
|
}
|
||||||
|
|
||||||
function setProfilePictureToDatabase($url) {
|
function setProfilePictureToDatabase($url) {
|
||||||
$stmt = $GLOBALS["db"]->prepare("
|
$stmt = $GLOBALS["db"]->prepare("
|
||||||
|
|||||||
@@ -7,6 +7,6 @@
|
|||||||
<link rel="stylesheet"
|
<link rel="stylesheet"
|
||||||
type="text/css"
|
type="text/css"
|
||||||
href="styles/index.css">
|
href="styles/index.css">
|
||||||
<script src="jqeury.js"></script>
|
<script src="/js/jqeury.js"></script>
|
||||||
<script src="registerAndLogin.js"></script>
|
<script src="/js/registerAndLogin.js"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
Reference in New Issue
Block a user