an-/ Abmeldung und Registrierung komplett fertig
parent
c56d4fd19d
commit
7439b9d2c3
|
@ -27,14 +27,14 @@
|
|||
<div>
|
||||
<a id="uberuns" href="uberuns.html">Über Uns</a>
|
||||
<a id="buecher" href="buecher.php">Bücher</a>
|
||||
<a id="meinebuecher" href="meinebuecher.php">Meine Bücher</a>
|
||||
<a id="meinebuecher" href="anmelden_meinebuecher.php">Meine Bücher</a>
|
||||
<a id="abmelden" href="abmelden.php">Abmelden</a>
|
||||
<form action="">
|
||||
<input class="suchleiste" type="search" placeholder="Suche..." >
|
||||
<button type="submit" id="buttonID" class="searchButton"><i class="fa fa-search"></i> </button>
|
||||
</form>
|
||||
<a id="erweitertesuche" href="erweitertesuche.html">Erweiterte Suche</a>
|
||||
<a href="warenkorb.php" id="warenKorbID"> <img id="shoppingCard" src="pictures/einkaufswagen.png" alt="Bild von einem Wagen"
|
||||
<a href="anmelden.php" id="warenKorbID"> <img id="shoppingCard" src="pictures/einkaufswagen.png" alt="Bild von einem Wagen"
|
||||
width="50" height="50"/> </a>
|
||||
</div>
|
||||
</header>
|
||||
|
|
|
@ -24,14 +24,14 @@
|
|||
<div>
|
||||
<a id="uberuns" href="uberuns.html">Über Uns</a>
|
||||
<a id="buecher" href="buecher.php">Bücher</a>
|
||||
<a id="meinebuecher" href="meinebuecher.php">Meine Bücher</a>
|
||||
<a id="meinebuecher" href="anmelden_meinebuecher.php">Meine Bücher</a>
|
||||
<a id="abmelden" href="abmelden.php">Abmelden</a>
|
||||
<form action="">
|
||||
<input class="suchleiste" type="search" placeholder="Suche..." >
|
||||
<button type="submit" id="buttonID" class="searchButton"><i class="fa fa-search"></i> </button>
|
||||
</form>
|
||||
<a id="erweitertesuche" href="erweitertesuche.html">Erweiterte Suche</a>
|
||||
<a href="warenkorb.php" id="warenKorbID"> <img id="shoppingCard" src="pictures/einkaufswagen.png" alt="Bild von einem Wagen"
|
||||
<a href="anmelden.php" id="warenKorbID"> <img id="shoppingCard" src="pictures/einkaufswagen.png" alt="Bild von einem Wagen"
|
||||
width="50" height="50"/> </a>
|
||||
</div>
|
||||
</header>
|
||||
|
@ -131,7 +131,7 @@
|
|||
<hr>
|
||||
|
||||
<div>
|
||||
<form class="anmeldung-überschriften" accept-charset="UTF-8" action="meinebuecher.php">
|
||||
<form class="anmeldung-überschriften" accept-charset="UTF-8" action="meinebuecher.php" method="POST">
|
||||
Karten-ID <span id="question-mark">
|
||||
<svg width="20px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
||||
<path d="M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256
|
||||
|
|
|
@ -1,12 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
<?php
|
||||
require('registriersystem.php');
|
||||
session_start();
|
||||
if(isset($_POST['Anmelden'])){
|
||||
$kartenid = $_POST["karten-id"];
|
||||
$db_link = mysqli_connect('localhost', 'web_b-3', 'een7Ao6s', 'bibliothek_candle', '3306');
|
||||
|
||||
function runSQL($sql){
|
||||
global $db_link;
|
||||
$db_res = mysqli_query($db_link, $sql);
|
||||
if(!$db_res){
|
||||
header("Location: 404.html");
|
||||
exit;
|
||||
}
|
||||
return $db_res;
|
||||
}
|
||||
|
||||
if(isset($_POST['submit'])){
|
||||
$kartenid = $_POST['karten-id'];
|
||||
$passwort = $_POST['password'];
|
||||
|
||||
$existiert = runSQL("SELECT COUNT(*) FROM `benutzer` WHERE `KartenID` = '$kartenid' and `Passwort` = '$passwort'");
|
||||
$row = mysqli_fetch_array($existiert);
|
||||
$karteexistiert = runSQL("SELECT COUNT(*) FROM `benutzer` WHERE `KartenID` = '$kartenid'");
|
||||
$zeile = mysqli_fetch_array($karteexistiert);
|
||||
|
||||
if($row['COUNT(*)'] > 0){
|
||||
|
||||
|
@ -33,14 +47,14 @@ require('registriersystem.php');
|
|||
<div>
|
||||
<a id="uberuns" href="uberuns.html">Über Uns</a>
|
||||
<a id="buecher" href="buecher.php">Bücher</a>
|
||||
<a id="meinebuecher" href="meinebuecher.php">Meine Bücher</a>
|
||||
<a id="meinebuecher" href="anmelden_meinebuecher.php">Meine Bücher</a>
|
||||
<a id="abmelden" href="abmelden.php">Abmelden</a>
|
||||
<form action="">
|
||||
<input class="suchleiste" type="search" placeholder="Suche..." >
|
||||
<button type="submit" id="buttonID" class="searchButton"><i class="fa fa-search"></i> </button>
|
||||
</form>
|
||||
<a id="erweitertesuche" href="erweitertesuche.html">Erweiterte Suche</a>
|
||||
<a href="warenkorb.php" id="warenKorbID"> <img id="shoppingCard" src="pictures/einkaufswagen.png" alt="Bild von einem Wagen"
|
||||
<a href="anmelden.php" id="warenKorbID"> <img id="shoppingCard" src="pictures/einkaufswagen.png" alt="Bild von einem Wagen"
|
||||
width="50" height="50"/> </a>
|
||||
</div>
|
||||
</header>
|
||||
|
@ -90,9 +104,13 @@ require('registriersystem.php');
|
|||
|
||||
</html>';
|
||||
|
||||
}else if($zeile['COUNT(*)'] > 0){
|
||||
header("Location: passwort_stimmt_nicht.html");
|
||||
}else{
|
||||
|
||||
header("Location: benutzer_existiert_nicht.html");
|
||||
}
|
||||
}else{
|
||||
echo'not set';
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -0,0 +1,98 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta lang="de"/>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="device=device-width, initial-scaling=1"/>
|
||||
<link rel="Stylesheet" type="text/css" href="style.css"/>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
<title>Candle Bibliothek | Erfolgreich Registriert</title>
|
||||
<link rel="icon" href="pictures/candle.png">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<h1 class="kopf" >
|
||||
<br><br>
|
||||
Bibliothek <a href="index.html" id="bildID"> <img id="CandleID" src="pictures/candle.png" alt="Bild von einer Kerze"
|
||||
width="200" height="192"/> </a>
|
||||
<br><br> Candle
|
||||
</h1>
|
||||
<div>
|
||||
<a id="uberuns" href="uberuns.html">Über Uns</a>
|
||||
<a id="buecher" href="buecher.php">Bücher</a>
|
||||
<a id="meinebuecher" href="anmelden_meinebuecher.php">Meine Bücher</a>
|
||||
<a id="abmelden" href="abmelden.php">Abmelden</a>
|
||||
<form action="">
|
||||
<input class="suchleiste" type="search" placeholder="Suche..." >
|
||||
<button type="submit" id="buttonID" class="searchButton"><i class="fa fa-search"></i> </button>
|
||||
</form>
|
||||
<a id="erweitertesuche" href="erweitertesuche.html">Erweiterte Suche</a>
|
||||
<a href="anmelden.php" id="warenKorbID"> <img id="shoppingCard" src="pictures/einkaufswagen.png" alt="Bild von einem Wagen"
|
||||
width="50" height="50"/> </a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!--------------------------------------------------------------------->
|
||||
|
||||
<div class="mainContentContainer">
|
||||
<div class="titleContainer">
|
||||
<h1 id="registeredTitle">Fehler</h1>
|
||||
</div>
|
||||
<div class="mainContent">
|
||||
<p id="textFirstHalf">
|
||||
|
||||
Das Passwort ist falsch!
|
||||
</p>
|
||||
<input type="button" id="loginNowButton" value="erneut versuchen"
|
||||
onclick="linkToRegisterPage()">
|
||||
|
||||
<script>
|
||||
function linkToRegisterPage() {
|
||||
window.location.replace("anmelden.php");
|
||||
}
|
||||
</script>
|
||||
<br><br><br>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--------------------------------------------------------------------->
|
||||
|
||||
<!--Link JS file-->
|
||||
<script src="burgerIcon.js"></script>
|
||||
<script>
|
||||
var widthissue = false;
|
||||
window.addEventListener("resize", function(event) {
|
||||
if(window.innerWidth > 800 && widthissue) {
|
||||
widthissue = false
|
||||
unset()
|
||||
}
|
||||
else if(window.innerWidth < 800) widthissue = true;
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<nav id="activeid" class="active">
|
||||
<div class="navLinks">
|
||||
<input class="nav-toggleclass"id="nav-toggle" type="checkbox" onclick="openNav()";>
|
||||
<label for="nav-toggle" class="icon-burger" >
|
||||
<div class="line"></div>
|
||||
<div class="line"></div>
|
||||
<div class="line"></div>
|
||||
</label>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
<footer class="fuss" >
|
||||
<div>
|
||||
<a id="impressum" href="impressum.html">Impressum</a>
|
||||
<a id="kontakt" href="kontakt.html">Kontakt</a>
|
||||
<a id="datenschutz" href="datenschutz.html">Datenschutz</a>
|
||||
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -19,7 +19,7 @@ function register($vorname,
|
|||
$vorname = mysqli_real_escape_string($db_link, $vorname);
|
||||
$nachname = mysqli_real_escape_string($db_link, $nachname);
|
||||
$email = mysqli_real_escape_string($db_link, $email);
|
||||
$passwort = md5( $passwort);
|
||||
$passwort = mysqli_real_escape_string($db_link, $passwort);
|
||||
$ort = mysqli_real_escape_string($db_link, $ort);
|
||||
$plz = mysqli_real_escape_string($db_link, $plz);
|
||||
$strasse = mysqli_real_escape_string($db_link, $strasse);
|
||||
|
|
|
@ -129,7 +129,7 @@ session_start();
|
|||
|
||||
<details>
|
||||
<summary>Sie habe bereits ein Konto?</summary>
|
||||
<p id="registrierenAusklappe"> <a href="anmelden_warenkorb.php"> Jetzt anmelden</a></p>
|
||||
<p id="registrierenAusklappe"> <a href="anmelden.php"> Jetzt anmelden</a></p>
|
||||
</details>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,12 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<?php
|
||||
require('registriersystem.php');
|
||||
session_start();
|
||||
if(isset($_POST['Anmelden'])){
|
||||
$kartenid = $_POST["karten-id"];
|
||||
|
||||
session_start();
|
||||
$db_link = mysqli_connect('localhost', 'web_b-3', 'een7Ao6s', 'bibliothek_candle', '3306');
|
||||
|
||||
function runSQL($sql){
|
||||
global $db_link;
|
||||
$db_res = mysqli_query($db_link, $sql);
|
||||
if(!$db_res){
|
||||
header("Location: 404.html");
|
||||
exit;
|
||||
}
|
||||
return $db_res;
|
||||
}
|
||||
|
||||
if(isset($_POST['submit'])){
|
||||
$kartenid = $_POST['karten-id'];
|
||||
$passwort = $_POST['password'];
|
||||
|
||||
$existiert = runSQL("SELECT COUNT(*) FROM `benutzer` WHERE `KartenID` = '$kartenid' and `Passwort` = '$passwort'");
|
||||
$karteexistiert = runSQL("SELECT COUNT(*) FROM `benutzer` WHERE `KartenID` = '$kartenid'");
|
||||
$zeile = mysqli_fetch_array($karteexistiert);
|
||||
$row = mysqli_fetch_array($existiert);
|
||||
|
||||
if($row['COUNT(*)'] > 0){
|
||||
|
@ -39,14 +54,14 @@
|
|||
<div>
|
||||
<a id="uberuns" href="uberuns.html">Über Uns</a>
|
||||
<a id="buecher" href="buecher.php">Bücher</a>
|
||||
<a id="meinebuecher" href="meinebuecher.php">Meine Bücher</a>
|
||||
<a id="meinebuecher" href="anmelden_meinebuecher.php">Meine Bücher</a>
|
||||
<a id="abmelden" href="abmelden.php">Abmelden</a>
|
||||
<form action="">
|
||||
<input class="suchleiste" type="search" placeholder="Suche..." >
|
||||
<button type="submit" id="buttonID" class="searchButton"><i class="fa fa-search"></i> </button>
|
||||
</form>
|
||||
<a id="erweitertesuche" href="erweitertesuche.html">Erweiterte Suche</a>
|
||||
<a href="warenkorb.php" id="warenKorbID"> <img id="shoppingCard" src="pictures/einkaufswagen.png" alt="Bild von einem Wagen"
|
||||
<a href="anmelden.php" id="warenKorbID"> <img id="shoppingCard" src="pictures/einkaufswagen.png" alt="Bild von einem Wagen"
|
||||
width="50" height="50"/> </a>
|
||||
</div>
|
||||
</header>
|
||||
|
@ -106,6 +121,13 @@
|
|||
</body>
|
||||
|
||||
</html>';
|
||||
}else if($zeile['COUNT(*)'] > 0){
|
||||
header("Location: passwort_stimmt_nicht.html");
|
||||
}else{
|
||||
header("Location: benutzer_existiert_nicht.html");
|
||||
}
|
||||
}else{
|
||||
echo'not set';
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue