mirror of
https://github.com/RustyRaptor/Culidore.git
synced 2026-12-03 15:15:20 -07:00
Fix instellingen, problemen, verwijder recept, fixprobleem, nieuwe knop js css
This commit is contained in:
1 parent
13f53aef52
commit
dd5c3603d4
11 files changed
+1376
-709
No files matched your search
Generated
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="PhpUnit">
|
||||
<phpunit_settings>
|
||||
<PhpUnitSettings load_method="CUSTOM_LOADER" />
|
||||
</phpunit_settings>
|
||||
</component>
|
||||
</project>
|
||||
Generated
+666
-669
File diff suppressed because it is too large.
Load diff
+88
-3
@@ -12,7 +12,7 @@ body{
|
||||
height:100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color:#333;
|
||||
background-color:#3d0000;
|
||||
}
|
||||
|
||||
|
||||
@@ -154,6 +154,8 @@ body{
|
||||
margin-top:5px;
|
||||
margin-right:50px;
|
||||
padding-right:20px;
|
||||
position:relative;
|
||||
left:30px;
|
||||
|
||||
}
|
||||
|
||||
@@ -367,7 +369,7 @@ body{
|
||||
color:black;
|
||||
}
|
||||
.recepttoevoegen input{
|
||||
|
||||
width:160px;
|
||||
border-style: solid;
|
||||
border-width: 2px;
|
||||
border-color: rgba(0,0,0,0.4);
|
||||
@@ -570,7 +572,15 @@ body{
|
||||
position:relative;
|
||||
|
||||
}
|
||||
.tablebugfixes, td, th {
|
||||
.tablebugfixes{
|
||||
border: 1px solid #811412;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.tablebugfixes td{
|
||||
border: 1px solid #811412;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.tablebugfixes tr{
|
||||
border: 1px solid #811412;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
@@ -598,4 +608,79 @@ body{
|
||||
line-height:12px;
|
||||
padding:25px 0;
|
||||
height:50px;
|
||||
}
|
||||
.checkbuxx{
|
||||
display:none;
|
||||
}
|
||||
|
||||
.fixed{
|
||||
color:dodgerblue;
|
||||
}
|
||||
.notfixed{
|
||||
color:orangered;
|
||||
}
|
||||
.bereiding a{
|
||||
text-decoration: none;
|
||||
background-color: #7d7d7d;
|
||||
color:white;
|
||||
}
|
||||
|
||||
.textareaomschrijving {
|
||||
position: absolute;
|
||||
|
||||
}
|
||||
.divprijs{
|
||||
position:relative;
|
||||
top:40px;
|
||||
}
|
||||
.divbereiding{
|
||||
position:relative;
|
||||
top:40px;
|
||||
width:50%;
|
||||
}
|
||||
.divomschrijving{
|
||||
position:relative;
|
||||
left:50%;
|
||||
width:50%;
|
||||
}
|
||||
.fotoinputdiv{
|
||||
position:relative;
|
||||
top:40px;
|
||||
}
|
||||
.divinputknop{
|
||||
position:relative;
|
||||
top:25px;
|
||||
}
|
||||
.fotoinputdiv {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
margin: 10px;
|
||||
}
|
||||
.fotoinputdiv input.upload {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
opacity: 0;
|
||||
filter: alpha(opacity=0);
|
||||
}
|
||||
|
||||
|
||||
#upload_button {
|
||||
display: none;
|
||||
|
||||
border: 0px;
|
||||
background: linear-gradient(180deg, #3d0000, #811412);
|
||||
border-radius: 3px;
|
||||
|
||||
color: #fff;
|
||||
|
||||
padding: 5px;
|
||||
}
|
||||
.divfoto{
|
||||
position:relative;
|
||||
top:30px;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
include('db.php');
|
||||
session_start();
|
||||
|
||||
|
||||
// maak recept aan
|
||||
$sql = "Update Problemen set Bugfix=1 where id=".$_POST['probl'];
|
||||
$result = mysqli_query($conn, $sql);
|
||||
// terug naar index pagina
|
||||
|
||||
|
||||
|
||||
if($result){
|
||||
header("location:problemen.php?l=1&prob=f");
|
||||
}
|
||||
else
|
||||
{
|
||||
header("location:problemen.php?l=1&prob=nf");
|
||||
}
|
||||
mysqli_close($conn);
|
||||
?>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 70 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 159 KiB |
@@ -2,8 +2,10 @@
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
|
||||
|
||||
<script src="https://use.fontawesome.com/3008661bde.js"></script>
|
||||
<script src ="civem.js"></script>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -80,11 +82,11 @@ if ($conn)
|
||||
}}}}
|
||||
if ($conn)
|
||||
{
|
||||
$vraag = 'select naam, rating, prijs, soort, omschrijving, foto, bereiding, Username, Tijdgeplaatst from tblrecepten';
|
||||
$vraag = 'select id, naam, rating, prijs, soort, omschrijving, foto, bereiding, Username, Tijdgeplaatst from tblrecepten';
|
||||
if ($result = mysqli_query($conn, $vraag)) {
|
||||
$xrec = 0;
|
||||
$xy=1;
|
||||
while ($row = mysqli_fetch_assoc($result)) {
|
||||
$xrec++;
|
||||
$xrec = $row['id'];
|
||||
echo "<script>
|
||||
$(document).ready(function(){
|
||||
$('#tabrec" . $xrec . "').click(function(){
|
||||
@@ -102,9 +104,10 @@ if ($conn)
|
||||
});
|
||||
</script>";
|
||||
|
||||
if ($xrec == 1) {
|
||||
if ($xy == 1) {
|
||||
$xy++;
|
||||
echo "<div class='mainpagina' onclick='closelogintje();'>
|
||||
<div class='venster'>
|
||||
<div class='venster' >
|
||||
</div>";
|
||||
}
|
||||
$time = strtotime($row['Tijdgeplaatst']);
|
||||
@@ -167,12 +170,16 @@ if ($conn)
|
||||
echo '
|
||||
document.getElementById("'.$y.$xrec.'ster").style.opacity = "0.3";';
|
||||
}
|
||||
echo "}</script>";
|
||||
}
|
||||
echo "<br>";
|
||||
echo "<br>";
|
||||
echo $row['bereiding'];
|
||||
?>
|
||||
echo "}</script>";
|
||||
}?>
|
||||
<?php if($admin) : ?>
|
||||
<a class="deleterecept" onclick='javascript:confirmationDelete($(this));return false;' href='verwijderrecept.php?id=<?=$xrec?>'>Verwijder recept</a>
|
||||
|
||||
<?php endif; ?>
|
||||
<div class="bereiding">
|
||||
<a><?=$row['bereiding']?></a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
@@ -188,12 +195,20 @@ if ($conn)
|
||||
?>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
function confirmationDelete(anchor)
|
||||
{
|
||||
var conf = confirm('Wil jij dit recept zeker verwijderen?');
|
||||
if(conf)
|
||||
window.location=anchor.attr("href");
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="menuvanboven">
|
||||
|
||||
|
||||
<ul>
|
||||
<a><img src="Finished.png" alt="logo"></a>
|
||||
<a href="index.php"><img src="Finished.png" alt="logo"></a>
|
||||
<?php
|
||||
if(isset($_SESSION['gebruiker'])){
|
||||
echo " <a class=\"circle\" href=\"#\">+</a>";
|
||||
@@ -239,12 +254,22 @@ if ($conn)
|
||||
if($_GET['pr']=='p'){
|
||||
echo "Verkeerde wachtwoord of gebruikersnaam";
|
||||
}}
|
||||
if(isset($_GET['rec'])){
|
||||
|
||||
if($_GET['rec']=='p'){
|
||||
echo "Fout met verwijderen van recept";
|
||||
}}
|
||||
?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="success">
|
||||
<a>
|
||||
<?php
|
||||
if(isset($_GET['re'])){
|
||||
if($_GET['re']=="s"){
|
||||
echo"Registratie voltooid";
|
||||
}
|
||||
}
|
||||
if(isset($_GET['lv'])){
|
||||
if($_GET['lv']=='s'){
|
||||
echo "Je bent nu ingelogd!";
|
||||
@@ -256,13 +281,19 @@ if ($conn)
|
||||
echo "Probleem is aangemeld";
|
||||
}
|
||||
|
||||
}
|
||||
if(isset($_GET['rec'])){
|
||||
if($_GET['rec']=='s'){
|
||||
echo "Recept verwijderd";
|
||||
}
|
||||
|
||||
}
|
||||
echo "</a>";
|
||||
echo "</div>";
|
||||
if(isset($_SESSION['gebruiker'])){?>
|
||||
</div><div class='gelogged'>
|
||||
<div class='accountinstellingen'><ul>
|
||||
<li><a style='cursor:pointer' class='instellingen'>Instellingen</a></li>
|
||||
<li><a style='cursor:pointer' class='instellingen' href="instellingen.php">Instellingen</a></li>
|
||||
<li><a style='cursor:pointer' class='aanmeldprobleem'>Probleem Aanmelden</a></li>
|
||||
|
||||
<?php
|
||||
@@ -414,7 +445,7 @@ if ($conn)
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<form class="allesformreg" action="registratie.php?loc=index" method="Post">
|
||||
<form class="allesformreg" style="overflow-y: scroll;" action="registratie.php?loc=index" method="Post">
|
||||
|
||||
<div class="divvoornaam">
|
||||
<a class="voornaam">Voornaam</a></br>
|
||||
@@ -454,7 +485,7 @@ if ($conn)
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="recepttoevoegen">
|
||||
<div class="recepttoevoegen" style="overflow-y: scroll;">
|
||||
<form class="voegrecept" action="recept.php" method="Post" enctype="multipart/form-data">
|
||||
|
||||
<div class="titelgerecht">
|
||||
@@ -462,9 +493,9 @@ if ($conn)
|
||||
<input type="txtText" name="Titel" id="TGR" required data-errormessage-value-missing="Vul dit veld in">
|
||||
|
||||
</div>
|
||||
<div class="divrating">
|
||||
<div class="divomschrijving">
|
||||
<a class="rating">Omschrijving</a></br>
|
||||
<input type="txtText" name="Omschrijving" id="RAT" required="" >
|
||||
<textarea class="textareaomschrijving" name="Omschrijving" style="width:250px;height:130px;" required data-errormessage-value-missing="Vul dit veld in"></textarea>
|
||||
</div>
|
||||
<div class="divprijs">
|
||||
<a class="prijs">Prijs 1-5</a></br>
|
||||
@@ -472,9 +503,11 @@ if ($conn)
|
||||
</div>
|
||||
<div class="divbereiding">
|
||||
<a class="bereiding">Bereiding</a></br>
|
||||
<textarea name="Bereiding" style="width:250px;height:150px;" required data-errormessage-value-missing="Vul dit veld in"></textarea>
|
||||
|
||||
<textarea name="Bereiding" style="width:250px;height:100px;" required data-errormessage-value-missing="Vul dit veld in"></textarea>
|
||||
</div>
|
||||
<div class="divsoort">
|
||||
|
||||
<div class="divprijs">
|
||||
<a class="soort">Soort</a></br>
|
||||
<select required data-errormessage-value-missing="Vul dit veld in" name="Soort">
|
||||
<option>Ontbijt</option>
|
||||
@@ -483,18 +516,18 @@ if ($conn)
|
||||
</select>
|
||||
</div>
|
||||
<div class="divfoto">
|
||||
<input type="file" name="Foto" accept="image/*" size=35>
|
||||
<?php include('test.php');?>
|
||||
</div>
|
||||
<input type="submit" name="Toevoegen" value="Toevoegen">
|
||||
<input class="divinputknop" type="submit" name="Toevoegen" value="Toevoegen">
|
||||
</form>
|
||||
</div>
|
||||
<div class="probleemtoevoegen">
|
||||
<div class="probleemtoevoegen" style="overflow-y: scroll;">
|
||||
<form id="probleemform" class="probleemtoevoeg" action="probleem.php" method="Post">
|
||||
|
||||
<div class="omschrijving">
|
||||
<a class="titelgerecht">Beschrijf je probleem:</a></br></br>
|
||||
<textarea rows="4" cols="50" name="probleembeschrijf" form="probleemform"></textarea>
|
||||
</div></br>
|
||||
</div>
|
||||
|
||||
<input type="submit" name="Toevoegen" value="Toevoegen">
|
||||
</form>
|
||||
|
||||
@@ -0,0 +1,440 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
|
||||
|
||||
<script src ="civem.js"></script>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" type="text/css" href="design.css" />
|
||||
<title>Culidore</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<script>
|
||||
<?php
|
||||
$admin = false;
|
||||
|
||||
session_start();
|
||||
if(isset($_GET['r'])){
|
||||
if($_GET['r']==1){
|
||||
echo "document.addEventListener('DOMContentLoaded', function() {
|
||||
regDown();
|
||||
});";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if(isset($_GET['l'])){
|
||||
if($_GET['l']==1){
|
||||
echo "document.addEventListener('DOMContentLoaded', function() {
|
||||
logDown();
|
||||
});";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
</script>
|
||||
<script>
|
||||
if(typeof window.history.pushState == 'function') {
|
||||
window.history.pushState({}, "Hide", "instellingen.php");
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function regDown(){
|
||||
$(".registratie").fadeToggle(300);
|
||||
$(".venster").fadeToggle(300);
|
||||
}
|
||||
function logDown(){
|
||||
$(".logintje").fadeToggle(300);
|
||||
$(".receptdiv").slideUp("fast");
|
||||
|
||||
}
|
||||
function instellDown(){
|
||||
$(".gelogged").fadeToggle(300);
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
include('db.php');
|
||||
if ($conn)
|
||||
{
|
||||
if(isset($_SESSION['gebruiker'])){
|
||||
$vraag = "select id, admin from Gebruikers where gebruiker='".$_SESSION['gebruiker']."'";
|
||||
if ($result = mysqli_query($conn, $vraag)) {
|
||||
while ($row = mysqli_fetch_assoc($result)){
|
||||
if($row['admin']==1){
|
||||
$admin = true;
|
||||
}
|
||||
}}}}
|
||||
if ($conn)
|
||||
{
|
||||
$vraag = "select voornaam, achternaam, email from Gebruikers where gebruiker='".$_SESSION['gebruiker']."'";
|
||||
echo "<div class='mainpagina' onclick='closelogintje();'>
|
||||
<div class='venster'>
|
||||
</div>";
|
||||
if ($result = mysqli_query($conn, $vraag)) {
|
||||
$xrec = 0;
|
||||
|
||||
|
||||
while ($row = mysqli_fetch_assoc($result)) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
else
|
||||
{
|
||||
echo 'Geen resultaat';
|
||||
}}
|
||||
mysqli_close($conn);
|
||||
|
||||
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="menuvanboven">
|
||||
|
||||
|
||||
<ul>
|
||||
<a href="index.php"><img src="Finished.png" alt="logo"></a>
|
||||
<?php
|
||||
if(isset($_SESSION['gebruiker'])){
|
||||
echo " <a class=\"circle\" href=\"#\">+</a>";
|
||||
}?>
|
||||
<?php
|
||||
|
||||
if (isset($_SESSION['gebruiker']))
|
||||
{
|
||||
$gebruiker = $_SESSION['gebruiker'];
|
||||
?>
|
||||
|
||||
|
||||
<li><a id="welkom" style="cursor:pointer" value="play"><?php echo $gebruiker; ?></a></li>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<li><a id="signupknop" style="cursor:pointer" value="play">Sign up</a></li>
|
||||
<li><a id="loginknop" style="cursor:pointer" value="play">Login</a></li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="logintje" id="logindivetje">
|
||||
<div class="errortjezz">
|
||||
<a>
|
||||
<?php
|
||||
if(isset($_GET['lv'])){
|
||||
|
||||
if($_GET['lv']=='p'){
|
||||
echo "Verkeerde wachtwoord of gebruikersnaam";
|
||||
}}
|
||||
if(isset($_GET['pr'])){
|
||||
|
||||
if($_GET['pr']=='p'){
|
||||
echo "Verkeerde wachtwoord of gebruikersnaam";
|
||||
}}
|
||||
if(isset($_GET['prob'])){
|
||||
|
||||
if($_GET['prob']=='nf'){
|
||||
echo "Probleem met probleem fixen";
|
||||
}}
|
||||
?>
|
||||
</a>
|
||||
</div>
|
||||
<div class="success">
|
||||
<a>
|
||||
<?php
|
||||
if(isset($_GET['lv'])){
|
||||
if($_GET['lv']=='s'){
|
||||
echo "Je bent nu ingelogd!";
|
||||
}
|
||||
|
||||
}
|
||||
if(isset($_GET['pr'])){
|
||||
if($_GET['pr']=='s'){
|
||||
echo "Probleem is aangemeld";
|
||||
}
|
||||
|
||||
}
|
||||
if(isset($_GET['prob'])){
|
||||
if($_GET['prob']=='f'){
|
||||
echo "Probleem is gefixed";
|
||||
}
|
||||
|
||||
}
|
||||
echo "</a>";
|
||||
echo "</div>";
|
||||
if(isset($_SESSION['gebruiker'])){?>
|
||||
</div><div class='gelogged'>
|
||||
<div class='accountinstellingen'><ul>
|
||||
<li><a style='cursor:pointer' class='instellingen'>Instellingen</a></li>
|
||||
<li><a style='cursor:pointer' class='aanmeldprobleem'>Probleem Aanmelden</a></li>
|
||||
|
||||
<?php
|
||||
if($admin){
|
||||
echo"<li><b><a style='cursor:pointer' class='probleembekijk'>Problemen bekijken</a></b></li>";
|
||||
}?>
|
||||
<li><a style='cursor:pointer' class='uitloggen' href='logout.php' style='cursor:pointer' value='play'>Uitloggen</a></li>
|
||||
</ul></div>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
else{?>
|
||||
|
||||
<form class='formlogin' action='login.php' method='Post'>
|
||||
<div class='loginuser'>
|
||||
<a class='usertekst'>Gebruikersnaam</a></br>
|
||||
<input type='txtText' name='gebruiker' id='gebruiker'>
|
||||
</div>
|
||||
<div class='loginpassje'>
|
||||
<a class='passjetekst'>Wachtwoord</a></br>
|
||||
<input type='password' name='passwoord' id='passwoord'>
|
||||
</div>
|
||||
<div class='btn'>
|
||||
<input type='submit' name='BUTNlogin' value='Login' class='btnlogin'>
|
||||
</div>
|
||||
</form>
|
||||
<?php }
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
$(document).ready(function(){
|
||||
$("#loginknop").click(function(){
|
||||
$("#logindivetje").fadeToggle("fast");
|
||||
$(".registratie").slideUp("fast");
|
||||
$(".venster").fadeOut("fast");
|
||||
$(".recepttoevoegen").slideUp("fast");
|
||||
$(".gelogged").fadeOut("fast");
|
||||
$(".receptdiv").slideUp("fast");
|
||||
});
|
||||
});
|
||||
|
||||
function closelogintje(){
|
||||
$("#logintje").slideUp("fast");
|
||||
|
||||
|
||||
}
|
||||
$(document).ready(function(){
|
||||
$("#signupknop").click(function(){
|
||||
$(".registratie").fadeIn(300);
|
||||
$(".logintje").slideUp("fast");
|
||||
$(".venster").fadeIn(300);
|
||||
$(".recepttoevoegen").slideUp("fast");
|
||||
$(".gelogged").fadeOut("fast");
|
||||
$(".receptdiv").slideUp("fast");
|
||||
});
|
||||
});
|
||||
$(document).ready(function(){
|
||||
$(".venster").click(function(){
|
||||
$(".registratie").slideUp(300);
|
||||
$(".logindivetje").slideUp("fast");
|
||||
$(".venster").fadeOut(300);
|
||||
$(".recepttoevoegen").slideUp("fast");
|
||||
$(".gelogged").slideUp("fast");
|
||||
$(".probleemtoevoegen").slideUp("fast");
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
$(document).keyup(function(e) {
|
||||
if (e.which === 27){
|
||||
$(".registratie").slideUp(300);
|
||||
$(".logindivetje").slideUp("fast");
|
||||
$(".venster").fadeOut(300);
|
||||
$(".recepttoevoegen").slideUp("fast");
|
||||
$(".gelogged").slideUp("fast");
|
||||
$(".probleemtoevoegen").slideUp("fast");
|
||||
$(".receptdiv").slideUp("fast");
|
||||
}});
|
||||
|
||||
$(document).ready(function(){
|
||||
$(".mainpagina").click(function(){
|
||||
$(".logintje").slideUp("fast");
|
||||
$(".registratie").slideUp("fast");
|
||||
|
||||
$(".recepttoevoegen").slideUp("fast");
|
||||
$(".gelogged").fadeOut("fast");
|
||||
});
|
||||
});
|
||||
$(document).ready(function(){
|
||||
$(".circle").click(function(){
|
||||
$(".logintje").slideUp("fast");
|
||||
$(".registratie").slideUp("fast");
|
||||
$(".venster").fadeIn("fast");
|
||||
$(".recepttoevoegen").slideDown("fast");
|
||||
$(".gelogged").fadeOut("fast");
|
||||
$(".receptdiv").slideUp("fast");
|
||||
$(".probleemtoevoegen").slideUp("fast");
|
||||
});
|
||||
});
|
||||
|
||||
$(document).ready(function(){
|
||||
$("#welkom").click(function(){
|
||||
$(".logintje").slideUp("fast");
|
||||
$(".registratie").slideUp("fast");
|
||||
$(".venster").fadeOut("fast");
|
||||
$(".recepttoevoegen").slideUp("fast");
|
||||
$(".gelogged").fadeToggle("fast");
|
||||
$(".receptdiv").slideUp("fast");
|
||||
$(".probleemtoevoegen").slideUp("fast");
|
||||
});
|
||||
});
|
||||
$(document).ready(function(){
|
||||
$(".aanmeldprobleem").click(function(){
|
||||
$(".logintje").slideUp("fast");
|
||||
$(".registratie").slideUp("fast");
|
||||
$(".venster").fadeIn("fast");
|
||||
$(".recepttoevoegen").slideUp("fast");
|
||||
$(".gelogged").fadeOut("fast");
|
||||
$(".receptdiv").slideUp("fast");
|
||||
$(".probleemtoevoegen").fadeToggle("fast");
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<div class="registratie">
|
||||
<div class="errortjezz">
|
||||
<a>
|
||||
<?php
|
||||
if(isset($_GET['e'])){
|
||||
|
||||
if($_GET['e']=='p'){
|
||||
echo "De wachtwoorden zijn niet gelijk aan elkaar";
|
||||
}
|
||||
if($_GET['e']=='m'){
|
||||
echo "De e-mail dat je ingegeven hebt is al geregistreerd";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<form class="allesformreg" action="registratie.php?loc=index" method="Post">
|
||||
|
||||
<div class="divvoornaam">
|
||||
<a class="voornaam">Voornaam</a></br>
|
||||
<input type="txtText" name="voor" id="VNT" required data-errormessage-value-missing="Vul dit veld in">
|
||||
|
||||
</div>
|
||||
<div class="divachternaam">
|
||||
<a class="achternaam">Achternaam</a></br>
|
||||
<input type="txtText" name="achter" id="ANT" required="" >
|
||||
</div>
|
||||
<div class="divemail">
|
||||
<a class="emaillabel">E-mail adress</a></br>
|
||||
<input class="inputje" type="email" placeholder="example@email.com" name="email" required data-errormessage-value-missing="Vul dit veld in" data-errormessage-type-mismatch="Foute e-mail adress!">
|
||||
</div>
|
||||
<div class="divusername">
|
||||
<a class="usernamelabel">Gebruikersnaam</a></br>
|
||||
<input class="inputje" type="txtText" name="gebruiker" required data-errormessage-value-missing="Vul dit veld in">
|
||||
</div>
|
||||
<div class="ww1">
|
||||
<a class="wachtwoordlabel">Wachtwoord</a></br>
|
||||
<input class="inputje" type="password" name="pass" required data-errormessage-value-missing="Vul dit veld in" >
|
||||
</div>
|
||||
<div class="ww2">
|
||||
<a class="wachtwoordagainlabel">Wachtwoord opnieuw invoeren</a></br>
|
||||
<input class="inputje" type="password" name="opnieuw" required data-errormessage-value-missing="Vul dit veld in" >
|
||||
</div>
|
||||
<div class="btn">
|
||||
<input type="submit" name="BUTN" value="Registreren" class="btnRegister">
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="recepttoevoegen">
|
||||
<form class="voegrecept" action="recept.php" method="Post">
|
||||
|
||||
<div class="titelgerecht">
|
||||
<a class="titelgerecht">Titel gerecht</a></br>
|
||||
<input type="txtText" name="Titel" id="TGR" required data-errormessage-value-missing="Vul dit veld in">
|
||||
|
||||
</div>
|
||||
<div class="divrating">
|
||||
<a class="rating">Omschrijving</a></br>
|
||||
<input type="txtText" name="Omschrijving" id="RAT" required="" >
|
||||
</div>
|
||||
<div class="divprijs">
|
||||
<a class="prijs">Prijs 1-5</a></br>
|
||||
<input type="txtText" name="Prijs" id="PRI" required data-errormessage-value-missing="Vul dit veld in">
|
||||
</div>
|
||||
<div class="divbereiding">
|
||||
<a class="bereiding">Bereiding</a></br>
|
||||
<textarea name="Bereiding" style="width:250px;height:150px;" required data-errormessage-value-missing="Vul dit veld in"></textarea>
|
||||
</div>
|
||||
<div class="divsoort">
|
||||
<a class="soort">Soort</a></br>
|
||||
<select required data-errormessage-value-missing="Vul dit veld in" name="Soort">
|
||||
<option>Ontbijt</option>
|
||||
<option>Middageten</option>
|
||||
<option>Avondeten</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="divfoto">
|
||||
<input type="file" name="Foto" id="fileToUpload" size=35>
|
||||
</div>
|
||||
<input type="submit" name="Toevoegen" value="Toevoegen">
|
||||
</form>
|
||||
</div>
|
||||
<div class="probleemtoevoegen">
|
||||
<form id="probleemform" class="probleemtoevoeg" action="probleem.php" method="Post">
|
||||
|
||||
<div class="omschrijving">
|
||||
<a class="titelgerecht">Beschrijf je probleem:</a></br></br>
|
||||
<textarea rows="4" cols="50" name="probleembeschrijf" form="probleemform"></textarea>
|
||||
</div></br>
|
||||
|
||||
<input type="submit" name="Toevoegen" value="Toevoegen">
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
+34
-11
@@ -41,7 +41,11 @@
|
||||
?>
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
if(typeof window.history.pushState == 'function') {
|
||||
window.history.pushState({}, "Hide", "problemen.php");
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function regDown(){
|
||||
@@ -67,7 +71,7 @@ include('db.php');
|
||||
if ($conn)
|
||||
{
|
||||
if(isset($_SESSION['gebruiker'])){
|
||||
$vraag = "select admin from Gebruikers where gebruiker='".$_SESSION['gebruiker']."'";
|
||||
$vraag = "select id, admin from Gebruikers where gebruiker='".$_SESSION['gebruiker']."'";
|
||||
if ($result = mysqli_query($conn, $vraag)) {
|
||||
while ($row = mysqli_fetch_assoc($result)){
|
||||
if($row['admin']==1){
|
||||
@@ -76,7 +80,7 @@ if ($conn)
|
||||
}}}}
|
||||
if ($conn)
|
||||
{
|
||||
$vraag = "select Omschrijving, Bugfix, gebruiker, datum from Problemen";
|
||||
$vraag = "select id,Omschrijving, Bugfix, gebruiker, datum from Problemen";
|
||||
echo "<div class='mainpagina' onclick='closelogintje();'>
|
||||
<div class='venster'>
|
||||
</div>";
|
||||
@@ -100,15 +104,15 @@ if ($result = mysqli_query($conn, $vraag)) {
|
||||
|
||||
while ($row = mysqli_fetch_assoc($result)) {
|
||||
if($row['Bugfix']){
|
||||
$bugfix = "Fixed";
|
||||
$bugfix = "<a class='fixed'>Fixed</a>";
|
||||
}
|
||||
else{
|
||||
$bugfix = "Not fixed";
|
||||
$bugfix = "<a class='notfixed'>Not fixed</a>";
|
||||
}
|
||||
$time = strtotime($row['datum']);
|
||||
|
||||
$idx = $row['id'];
|
||||
$newformat = date('d-F-Y', $time);
|
||||
?>
|
||||
?><?php if($admin) : ?>
|
||||
<tr>
|
||||
<td>
|
||||
<?=$row['Omschrijving']?>
|
||||
@@ -124,11 +128,17 @@ if ($result = mysqli_query($conn, $vraag)) {
|
||||
<td>
|
||||
<?=$newformat?>
|
||||
</td>
|
||||
<td>
|
||||
<a class="circle2" href="#">✓</a>
|
||||
<td><?php
|
||||
if($row['Bugfix']==false){
|
||||
echo"<form method=\"POST\" action=\"fixprobleem.php\">
|
||||
<input class=\"checkbuxx\" name=\"probl\" value=\"$idx\" checked type=\"text\">
|
||||
<input type=\"submit\" value=\"✓\">
|
||||
</form>";
|
||||
}?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
|
||||
@@ -153,7 +163,7 @@ else
|
||||
|
||||
|
||||
<ul>
|
||||
<a><img src="Finished.png" alt="logo"></a>
|
||||
<a href="index.php"><img src="Finished.png" alt="logo"></a>
|
||||
<?php
|
||||
if(isset($_SESSION['gebruiker'])){
|
||||
echo " <a class=\"circle\" href=\"#\">+</a>";
|
||||
@@ -199,6 +209,11 @@ else
|
||||
if($_GET['pr']=='p'){
|
||||
echo "Verkeerde wachtwoord of gebruikersnaam";
|
||||
}}
|
||||
if(isset($_GET['prob'])){
|
||||
|
||||
if($_GET['prob']=='nf'){
|
||||
echo "Probleem met probleem fixen";
|
||||
}}
|
||||
?>
|
||||
</a>
|
||||
</div>
|
||||
@@ -216,6 +231,12 @@ else
|
||||
echo "Probleem is aangemeld";
|
||||
}
|
||||
|
||||
}
|
||||
if(isset($_GET['prob'])){
|
||||
if($_GET['prob']=='f'){
|
||||
echo "Probleem is gefixed";
|
||||
}
|
||||
|
||||
}
|
||||
echo "</a>";
|
||||
echo "</div>";
|
||||
@@ -233,6 +254,8 @@ else
|
||||
</ul></div>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
else{?>
|
||||
|
||||
<form class='formlogin' action='login.php' method='Post'>
|
||||
|
||||
@@ -1,4 +1,37 @@
|
||||
<?php
|
||||
<style>#upload_button {
|
||||
display: none;
|
||||
|
||||
border: 0px;
|
||||
background: linear-gradient(180deg, #3d0000, #811412);
|
||||
border-radius: 3px;
|
||||
|
||||
?>
|
||||
color: #fff;
|
||||
|
||||
padding: 5px;
|
||||
}</style>
|
||||
|
||||
<script src="https://use.fontawesome.com/3008661bde.js"></script>
|
||||
|
||||
<form>
|
||||
<p><button id="upload_button"><i class="fa fa-cloud-upload"></i>Click here to select file</button></p>
|
||||
<p><input id="upload_input" name="Foto" type="file"/></p>
|
||||
|
||||
</form>
|
||||
<script>
|
||||
var button = document.getElementById('upload_button');
|
||||
var input = document.getElementById('upload_input');
|
||||
|
||||
// Making input invisible, but leaving shown fo graceful degradation
|
||||
input.style.display = 'none';
|
||||
button.style.display = 'initial';
|
||||
|
||||
button.addEventListener('click', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
input.click();
|
||||
});
|
||||
|
||||
input.addEventListener('change', function () {
|
||||
button.innerText = this.value;
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
include('db.php');
|
||||
session_start();
|
||||
|
||||
$gebruiker = $_SESSION['gebruiker'];
|
||||
|
||||
$probleem = $_POST['probleembeschrijf'];
|
||||
|
||||
$datum = date("Y-n-d");
|
||||
|
||||
|
||||
// maak recept aan
|
||||
$sql = "DELETE from tblrecepten where id=".$_GET['id'];
|
||||
$result = mysqli_query($conn, $sql);
|
||||
// terug naar index pagina
|
||||
|
||||
|
||||
|
||||
if($result){
|
||||
header("location:index.php?rec=s&l=1");
|
||||
}
|
||||
else
|
||||
{
|
||||
header("location:index.php?rec=p&l=1");
|
||||
}
|
||||
mysqli_close($conn);
|
||||
?>
|
||||
Reference in new issue
Block a user