2023-05-26 16:39:10 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<?php
|
2023-06-05 16:49:14 +02:00
|
|
|
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'];
|
2023-06-05 15:13:50 +02:00
|
|
|
$passwort = $_POST['password'];
|
2023-06-05 16:49:14 +02:00
|
|
|
|
2023-06-05 15:13:50 +02:00
|
|
|
$existiert = runSQL("SELECT COUNT(*) FROM `benutzer` WHERE `KartenID` = '$kartenid' and `Passwort` = '$passwort'");
|
|
|
|
$row = mysqli_fetch_array($existiert);
|
2023-06-05 16:49:14 +02:00
|
|
|
$karteexistiert = runSQL("SELECT COUNT(*) FROM `benutzer` WHERE `KartenID` = '$kartenid'");
|
|
|
|
$zeile = mysqli_fetch_array($karteexistiert);
|
2023-06-05 15:13:50 +02:00
|
|
|
|
|
|
|
if($row['COUNT(*)'] > 0){
|
2023-06-05 16:49:14 +02:00
|
|
|
|
2023-06-05 15:13:50 +02:00
|
|
|
$_SESSION['eingeloggt'] = 1;
|
|
|
|
echo '<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 | Meine Bücher</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>
|
2023-06-05 16:49:14 +02:00
|
|
|
<a id="meinebuecher" href="anmelden_meinebuecher.php">Meine Bücher</a>
|
2023-06-05 15:13:50 +02:00
|
|
|
<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>
|
2023-06-05 16:49:14 +02:00
|
|
|
<a href="anmelden.php" id="warenKorbID"> <img id="shoppingCard" src="pictures/einkaufswagen.png" alt="Bild von einem Wagen"
|
2023-06-05 15:13:50 +02:00
|
|
|
width="50" height="50"/> </a>
|
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
<div class="containerofmeinebuecher">
|
|
|
|
<p id="meinebüchertitel">Meine Bücher</p>
|
|
|
|
|
|
|
|
</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>
|
|
|
|
<!--Burger-->
|
|
|
|
<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>';
|
|
|
|
|
2023-06-05 16:49:14 +02:00
|
|
|
}else if($zeile['COUNT(*)'] > 0){
|
|
|
|
header("Location: passwort_stimmt_nicht.html");
|
2023-06-05 15:13:50 +02:00
|
|
|
}else{
|
2023-06-05 16:49:14 +02:00
|
|
|
header("Location: benutzer_existiert_nicht.html");
|
2023-06-05 15:13:50 +02:00
|
|
|
}
|
2023-06-05 16:49:14 +02:00
|
|
|
}else{
|
|
|
|
echo'not set';
|
2023-06-05 15:13:50 +02:00
|
|
|
}
|
2023-05-26 16:39:10 +02:00
|
|
|
|
|
|
|
?>
|