|
@ -1,10 +0,0 @@
|
|||
<?php
|
||||
$server="mysql:host=localhost;dbname=anmelden";
|
||||
$user="root";
|
||||
$pw="";
|
||||
|
||||
$dbh= new PDO($server,$user,$pw);
|
||||
if(!$dbh){
|
||||
echo "Verbindung Fehlgeschlagen";
|
||||
}
|
||||
?>
|
|
@ -1,13 +0,0 @@
|
|||
<?php
|
||||
$server="mysql:host=localhost;dbname=quiz_fragen_css";
|
||||
$user="root";
|
||||
$pw="";
|
||||
|
||||
$dbh= new PDO($server,$user,$pw);
|
||||
if(!$dbh){
|
||||
echo "Verbindung Fehlgeschlagen";
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
|
@ -1,65 +0,0 @@
|
|||
<?php include 'datenbanken.php';?>
|
||||
<?php session_start();?>
|
||||
|
||||
<?php
|
||||
// Frage Nummer (Default=1)
|
||||
$nummer = (int) $_GET['n'];
|
||||
|
||||
// gesamte fragen
|
||||
$query = "SELECT * FROM fragen";
|
||||
|
||||
// Ergebnisse
|
||||
$ergebnisse = $dbh->query($query);
|
||||
$total = $ergebnisse->rowCount();
|
||||
|
||||
$query = "SELECT * FROM fragen WHERE fragen_nummer = $nummer";
|
||||
$ergebnisse = $dbh->query($query);
|
||||
$frage = $ergebnisse->fetch();
|
||||
|
||||
//Auswahlen
|
||||
$query = "SELECT * FROM auswahlmöglichkeiten WHERE fragen_nummer = $nummer";
|
||||
|
||||
//Ergebnise
|
||||
$auswahlen = $dbh->query($query);
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="CSS/für den Test.css">
|
||||
<title>Quiz-Fragen</title>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="header">
|
||||
<h1>CSS Quiz-Fragen</h1>
|
||||
</div>
|
||||
</header>
|
||||
<main>
|
||||
<div class="container">
|
||||
<div class="current"> Frage <?php echo $frage['fragen_nummer']; ?> von <?php echo $total; ?></div>
|
||||
<p class="question">
|
||||
<?php echo $frage['text'];?>
|
||||
</p>
|
||||
<form method="post" action="prozess.php">
|
||||
<ul class="auswahlen">
|
||||
<?php while($row = $auswahlen->fetch()): ?>
|
||||
<li><input id="fragen" name="auswahl" type="radio" value="<?php echo $row['id'];?>" /><?php echo"<label for='fragen' style='width :auto'>". $row['text']."</label>";?></li>
|
||||
<?php endwhile;?>
|
||||
</ul>
|
||||
<input class="submit" type="submit" value="Nächste"/>
|
||||
<input type="hidden" name="nummer" value="<?php echo $nummer; ?>" />
|
||||
</form>
|
||||
</main>
|
||||
<footer>
|
||||
<div class="container">
|
||||
<p>Urheberrechte 2023 © OV-Codeschule</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,124 +0,0 @@
|
|||
<?php session_start(); ?>
|
||||
|
||||
<?php include 'datenbanken.php';?>
|
||||
|
||||
<?php
|
||||
//Gesamtfragen bekommen
|
||||
$query = "SELECT * FROM fragen";
|
||||
$ergebnisse = $dbh->query($query);
|
||||
$total = $ergebnisse->rowCount();
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="CSS/für den Test.css">
|
||||
<title>Quiz-Fragen</title>
|
||||
<style>
|
||||
body{
|
||||
font-family: arial;
|
||||
font-size: 30px;
|
||||
line-height: 1.6em;
|
||||
}
|
||||
|
||||
li{
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
a{
|
||||
text-decoration: none;
|
||||
}
|
||||
label{
|
||||
display: inline-block;
|
||||
width: 180px;
|
||||
}
|
||||
input[type='text']{
|
||||
width: 50%;
|
||||
padding: 4px;
|
||||
border-radius: 5px;
|
||||
border: 1px #ccc solid;
|
||||
}
|
||||
input[type='number']{
|
||||
width: 50px;
|
||||
padding: 4px;
|
||||
border-radius: 5px;
|
||||
border: 1px #ccc solid;
|
||||
|
||||
}
|
||||
|
||||
.container{
|
||||
width: 60%;
|
||||
margin: 0 auto;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.header {
|
||||
padding: 80px;
|
||||
text-align: center;
|
||||
background: #1abc9c;
|
||||
color: white;
|
||||
border-bottom: 3px #f4f4f4 solid;
|
||||
|
||||
|
||||
}
|
||||
footer{
|
||||
border-top: 3px #f4f4f4 solid ;
|
||||
text-align: center;
|
||||
padding-top: 5px;
|
||||
}
|
||||
main{
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
a.start{
|
||||
display: inline-block;
|
||||
color: #666;
|
||||
background-color: #f4f4f4;
|
||||
border: 1px dotted #ccc;
|
||||
padding: 6px 13px;
|
||||
}
|
||||
.current{
|
||||
padding: 10px;
|
||||
background: #f4f4f4;
|
||||
border: #ccc dotted 1px;
|
||||
margin: 20px 0 10px 0;
|
||||
width: 50%;
|
||||
}
|
||||
@media only screen and (max-width:960px){
|
||||
.container{
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
}
|
||||
.submit{
|
||||
width: 50px;
|
||||
background-color: aqua;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<h1>CSS Quiz-Fragen</h1>
|
||||
</div>
|
||||
<main>
|
||||
<div class="container">
|
||||
<h2>Testen Sie Ihr CSS-Wissen</h2>
|
||||
<p>Dies ist ein Multiple-Choice-Quiz, um Ihre HTML-Kenntnisse zu testen</p>
|
||||
<ul>
|
||||
<li><strong>Anzahl der Fragen: </strong><?php echo $total; ?></li>
|
||||
<li><strong>Typ: </strong>Mehrfachauswahl</li>
|
||||
<li><strong>Geschätzte Zeit: </strong>8 Minuten</li>
|
||||
</ul>
|
||||
<a href="fragen.php?n=1" class="start">Quiz starten</a>
|
||||
</div>
|
||||
</main>
|
||||
<footer>
|
||||
<div class="container">
|
||||
URHEBERRECHTE © 2023, OV-CODESCHULE
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,47 +0,0 @@
|
|||
<?php include 'datenbanken.php'; ?>
|
||||
<?php session_start();?>
|
||||
<?php
|
||||
if (!isset($_SESSION['css_punktzahl'])){
|
||||
$_SESSION['css_punktzahl'] = 0;
|
||||
}
|
||||
|
||||
if ($_POST){
|
||||
$nummer = $_POST['nummer'];
|
||||
$ausgewählte_wahl = $_POST['auswahl'];
|
||||
$nächste = $nummer+1;
|
||||
|
||||
// Gesamte fragen
|
||||
$query = "SELECT * FROM fragen";
|
||||
|
||||
// Ergebnisse
|
||||
$ergebnisse = $dbh->query($query);
|
||||
$total = $ergebnisse->rowCount();
|
||||
|
||||
// Richtige Auswahl
|
||||
$query= "SELECT * FROM auswahlmöglichkeiten WHERE fragen_nummer = $nummer AND ist_richtig = 1";
|
||||
|
||||
// Ergebnisse
|
||||
$ergebnis = $dbh->query($query);
|
||||
|
||||
// Zeilen
|
||||
$row = $ergebnis->fetch();
|
||||
|
||||
// Setze die richtige Auswahl
|
||||
$richtige_auswahl = $row['id'];
|
||||
|
||||
// Vergleich
|
||||
if($richtige_auswahl == $ausgewählte_wahl){
|
||||
|
||||
// Antwort richtig
|
||||
$_SESSION['css_punktzahl'] +=1;
|
||||
}
|
||||
|
||||
// Überprüfe, ob die Letzte Frage
|
||||
if ($nummer == $total){
|
||||
header("Location: schluss.php");
|
||||
exit();
|
||||
}else{
|
||||
header("Location: fragen.php?n=".$nächste);
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -1,51 +0,0 @@
|
|||
<?php include 'datenbanken.php'; ?>
|
||||
<?php session_start();?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="CSS/für den Test.css">
|
||||
<title>Endstand</title>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="container">
|
||||
<h1>CSS Quiz-Fragen</h1>
|
||||
</div>
|
||||
</header>
|
||||
<main>
|
||||
<div class="container">
|
||||
|
||||
<?php
|
||||
|
||||
if ($_SESSION["css_punktzahl"] >= 10){
|
||||
echo " <h2>Perfekt!</h2>
|
||||
<p>Sie haben den Test geschaft.</p>";
|
||||
echo"<p>Endstand: ".$_SESSION['css_punktzahl']."/12 Punkte"."</p>
|
||||
<a href='../Die CSS Zertifikat.php' class='zertifikat'>Zertifikat</a>";
|
||||
}else{
|
||||
echo "
|
||||
<h2>Erfolgloser Test</h2>
|
||||
<p>Sie haben den CSS Test leider nicht geschafft.</p>
|
||||
<p>Endstand: ".$_SESSION['css_punktzahl']."</p>
|
||||
<a href='fragen.php?n=1' class='start'>Nochmal Testen</a>
|
||||
";
|
||||
}
|
||||
|
||||
// Punkte zurücksetzen
|
||||
$_SESSION['css_punktzahl'] = 0;
|
||||
|
||||
?>
|
||||
</div>
|
||||
</main>
|
||||
<footer>
|
||||
<div class="container">
|
||||
<p>Urheberrechte 2023 © OV-Codeschule</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1,88 +0,0 @@
|
|||
body{
|
||||
font-family: arial;
|
||||
font-size: 30px;
|
||||
line-height: 1.6em;
|
||||
}
|
||||
|
||||
li{
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
a{
|
||||
text-decoration: none;
|
||||
}
|
||||
label{
|
||||
display: inline-block;
|
||||
width: 180px;
|
||||
}
|
||||
input[type='text']{
|
||||
width: 50%;
|
||||
padding: 4px;
|
||||
border-radius: 5px;
|
||||
border: 1px #ccc solid;
|
||||
}
|
||||
input[type='number']{
|
||||
width: 50px;
|
||||
padding: 4px;
|
||||
border-radius: 5px;
|
||||
border: 1px #ccc solid;
|
||||
|
||||
}
|
||||
|
||||
.container{
|
||||
width: 60%;
|
||||
margin: 0 auto;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.header {
|
||||
padding: 80px;
|
||||
text-align: center;
|
||||
background: #1abc9c;
|
||||
color: white;
|
||||
border-bottom: 3px #f4f4f4 solid;
|
||||
|
||||
|
||||
}
|
||||
footer{
|
||||
border-top: 3px #f4f4f4 solid ;
|
||||
text-align: center;
|
||||
padding-top: 5px;
|
||||
}
|
||||
main{
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
a.start{
|
||||
display: inline-block;
|
||||
color: #666;
|
||||
background-color: #f4f4f4;
|
||||
border: 1px dotted #ccc;
|
||||
padding: 6px 13px;
|
||||
}
|
||||
.current{
|
||||
padding: 10px;
|
||||
background: #f4f4f4;
|
||||
border: #ccc dotted 1px;
|
||||
margin: 20px 0 10px 0;
|
||||
width: 50%;
|
||||
}
|
||||
@media only screen and (max-width:960px){
|
||||
.container{
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
}
|
||||
.submit{
|
||||
display: inline-block;
|
||||
color: #666;
|
||||
background-color: #f4f4f4;
|
||||
border: 1px dotted #ccc;
|
||||
padding: 6px 13px;
|
||||
}
|
||||
.container .zertifikat{
|
||||
display: inline-block;
|
||||
color: #666;
|
||||
background-color: #f4f4f4;
|
||||
border: 1px dotted #ccc;
|
||||
padding: 6px 13px;
|
||||
}
|
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 662 KiB After Width: | Height: | Size: 662 KiB |
Before Width: | Height: | Size: 250 KiB After Width: | Height: | Size: 250 KiB |
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 97 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 3.6 MiB After Width: | Height: | Size: 3.6 MiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 7.9 KiB After Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 155 KiB After Width: | Height: | Size: 155 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |