diff --git a/entry.php b/entry.php deleted file mode 100644 index 8ee12c5..0000000 --- a/entry.php +++ /dev/null @@ -1,72 +0,0 @@ -" . $_POST['tan'] . "<-"; - if($_POST['tan'] != ""){ - addEntry(); - consumeTan($_POST['tan']); - } - } - - function addEntry() { - - } - -function consumeTan($tan) { - require('dbConnect.php'); //Erstellt variable mit dem namen $database - - //Stelle sicher dass die Tan noch verfügbar ist. - $abfrage = "SELECT `used`, `tan` FROM `tans` WHERE `tan` = '" . $tan . "'"; - $ergebnis = mysqli_query($database, $abfrage); - - if($ergebnis->num_rows == 0){ - echo "Tan nicht vergeben"; - return; - } - - $resultStr = ""; - - while ($row = $ergebnis->fetch_assoc()) { - $resultStr = $resultStr . $row["used"] . ' ' . $row["tan"] . '
'; - if($row["used"] == 1){ - echo "Tan schon verbraucht"; - return; - } - - } - - //echo $resultStr; - - //Setzte Tan auf verbraucht - $update = $database->query("UPDATE `tans` SET `used`= true WHERE `tan` = '" . $_POST['tan'] . "'"); - - echo "Tan verbraucht " . $_POST['tan']; -} - -?> - - - - - - - - -
- Vorname:
-
- Nachname:
-
- E-Mail:
-
- Nachricht:
-
- Tan:
-
- - - -
- - - diff --git a/index.php b/index.php index 1717b57..38d4ab0 100644 --- a/index.php +++ b/index.php @@ -18,67 +18,54 @@ - + + - - - - - - - -

Session User:
- - - - diff --git a/php/logout.php b/php/logout.php new file mode 100644 index 0000000..bb1dcce --- /dev/null +++ b/php/logout.php @@ -0,0 +1,5 @@ + diff --git a/segments/_entryForm.php b/segments/_entryForm.php index 19852e5..7c65520 100644 --- a/segments/_entryForm.php +++ b/segments/_entryForm.php @@ -50,7 +50,7 @@ function consumeTan($tanID) {
-
+
diff --git a/segments/_headerSession.php b/segments/_headerSession.php index 962884d..0bf375b 100644 --- a/segments/_headerSession.php +++ b/segments/_headerSession.php @@ -1,3 +1,5 @@ + +