Kommentare

This commit is contained in:
eichehome 2021-12-05 14:21:13 +01:00
parent 2113079311
commit 9d730633ad
6 changed files with 34 additions and 32 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
include/DBConnection.inc.php

View file

@ -14,6 +14,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
@import url(normalize.css); @import url(normalize.css);
.message { .message {
max-width: 30em; max-width: 30em;

View file

@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
error_reporting(E_ALL); //Debuging error_reporting(E_ALL); //Debuging
require_once 'include/DBConnection.inc.php'; require_once 'include/DBConnection.inc.php';
function autoloader($classname) function autoloader($classname)
@ -73,10 +73,10 @@ if (isset($_SESSION["login"]) && $session->get("login") == 1) {
</head> </head>
<body> <body>
<!-- Ausgabe einer eventuellen Statusmeldung -->
<?php if (isset($message) && $message != ""): ?> <?php if (isset($message) && $message != ""): ?>
<div class="modal"> <div class="modal">
<div class="message sucsses"> <div class="message sucsses">
<!-- Ausgabe einer eventuellen Statusmeldung -->
<p><?php echo $message; ?></p> <p><?php echo $message; ?></p>
</div> </div>
</div> </div>

View file

@ -99,7 +99,7 @@ class Datenbank extends DBClass
} }
/** /**
* Nichtmehr nötig * Nicht mehr nötig
* @param string $name * @param string $name
* @return boolean * @return boolean
*/ */

View file

@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
error_reporting(E_ALL); //Debuging error_reporting(E_ALL); //Debuging
require_once 'include/DBConnection.inc.php'; require_once 'include/DBConnection.inc.php';
function autoloader($classname) function autoloader($classname)
@ -81,18 +81,18 @@ if (isset($_SESSION["finished"]) && $session->get("finished")) {
</head> </head>
<body> <body>
<!-- Ausgabe einer eventuellen Fehlermeldung -->
<?php if (isset($errorMessage) && $errorMessage != ""): ?> <?php if (isset($errorMessage) && $errorMessage != ""): ?>
<div class="modal"> <div class="modal">
<div class="message error"> <div class="message error">
<!-- Ausgabe einer eventuellen Fehlermeldung -->
<p><?php echo $errorMessage; ?></p> <p><?php echo $errorMessage; ?></p>
</div> </div>
</div> </div>
<?php endif;?> <?php endif;?>
<!-- Ausgabe einer eventuellen Statusmeldung -->
<?php if (isset($message) && $message != ""): ?> <?php if (isset($message) && $message != ""): ?>
<div class="modal"> <div class="modal">
<div class="message sucsses"> <div class="message sucsses">
<!-- Ausgabe einer eventuellen Statusmeldung -->
<p><?php echo $message; ?></p> <p><?php echo $message; ?></p>
</div> </div>
</div> </div>

View file

@ -15,7 +15,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
error_reporting(E_ALL); //Debuging error_reporting(E_ALL); //Debuging
require_once 'include/DBConnection.inc.php'; require_once 'include/DBConnection.inc.php';
function autoloader($classname) function autoloader($classname)
@ -133,50 +133,50 @@ if ($check) {
</head> </head>
<body> <body>
<?php if (isset($errorMessage) && $errorMessage != ""): ?> <!-- Ausgabe einer eventuellen Fehlermeldung -->
<?php if (isset($errorMessage) && $errorMessage != ""): ?>
<div class="modal"> <div class="modal">
<div class="message error"> <div class="message error">
<!-- Ausgabe einer eventuellen Fehlermeldung -->
<p><?php echo $errorMessage; ?></p> <p><?php echo $errorMessage; ?></p>
</div> </div>
</div> </div>
<?php endif;?> <?php endif;?>
<!-- Ausgabe einer eventuellen Statusmeldung -->
<?php if (isset($message) && $message != ""): ?> <?php if (isset($message) && $message != ""): ?>
<div class="modal"> <div class="modal">
<div class="message sucsses"> <div class="message sucsses">
<!-- Ausgabe einer eventuellen Statusmeldung -->
<p><?php echo $message; ?></p> <p><?php echo $message; ?></p>
</div> </div>
</div> </div>
<?php endif;?> <?php endif;?>
<?php <?php
$kurse = $db->selectKurse(); $kurse = $db->selectKurse();
echo '<form action="wahl.php" method="post">'; echo '<form action="wahl.php" method="post">';
?> ?>
<p class="name"><?php echo 'Hallo, ' . convertName(convertUmlauteFrom($nutzername)) . ', bitte auswählen:'; ?></p> <p class="name"><?php echo 'Hallo, ' . convertName(convertUmlauteFrom($nutzername)) . ', bitte auswählen:'; ?></p>
<?php <?php
echo '<table border="1"><tr><td></td>'; echo '<table border="1"><tr><td></td>';
for ($i = 0; $i < count($kurse); $i++) { for ($i = 0; $i < count($kurse); $i++) {
echo "<td>" . convertUmlauteFrom($kurse[$i]["name"]) . "</td>"; echo "<td>" . convertUmlauteFrom($kurse[$i]["name"]) . "</td>";
} }
for ($j = 0; $j < 3; $j++) { for ($j = 0; $j < 3; $j++) {
echo "<tr>"; echo "<tr>";
echo "<td>Wahl " . ($j + 1) . "</td>"; echo "<td>Wahl " . ($j + 1) . "</td>";
for ($k = 0; $k < count($kurse); $k++) { for ($k = 0; $k < count($kurse); $k++) {
echo "<td>"; echo "<td>";
echo '<input type="radio" id="' . $j . '/' . $k . '" name="wahl' . $j . '" value="' . convertUmlauteFrom($kurse[$k]["name"]) . ';' . $kurse[$k]["stunde"] . '">'; echo '<input type="radio" id="' . $j . '/' . $k . '" name="wahl' . $j . '" value="' . convertUmlauteFrom($kurse[$k]["name"]) . ';' . $kurse[$k]["stunde"] . '">';
echo '<label for="' . $j . '/' . $k . '">' . $kurse[$k]["stunde"] . '</label>'; echo '<label for="' . $j . '/' . $k . '">' . $kurse[$k]["stunde"] . '</label>';
echo "</td>"; echo "</td>";
} }
echo "</tr>"; echo "</tr>";
} }
echo '<tr><td colspan="' . (count($kurse) + 1) . '"><input type="submit" value="Wählen"></td></tr></table>'; echo '<tr><td colspan="' . (count($kurse) + 1) . '"><input type="submit" value="Wählen"></td></tr></table>';
?> ?>
<input type="hidden" name="check" value="ja"> <input type="hidden" name="check" value="ja">
<?php <?php
echo "</form>"; echo "</form>";
?> ?>
<noscript> <noscript>
<p> <p>
JavaScript wird für Annehmlichkeiten verwendet, um diese nutzen zu können, sollten Sie dies auch aktivieren. JavaScript wird für Annehmlichkeiten verwendet, um diese nutzen zu können, sollten Sie dies auch aktivieren.