PDF Ausgabe erweitert

This commit is contained in:
2026-03-30 20:54:41 +02:00
parent 098c2d4275
commit bb422005d0
2 changed files with 184 additions and 1 deletions
+11 -1
View File
@@ -17,6 +17,13 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
# echo "Location: createPDF.php?id=$userId&month=$month&year=$year";
header("Location: createPDF.php?id=$userId&month=$month&year=$year");
exit();
} elseif ($_POST["action"] == "Alle PDFs anzeigen") {
$selectedMonth = $_POST["month"];
$monthYear = explode("/", $selectedMonth);
$month = $monthYear[0];
$year = $monthYear[1];
header("Location: createAllPDF.php?month=$month&year=$year");
exit();
}
}
@@ -120,6 +127,9 @@ if ($selectedMonth && $selectedUser) {
<input type="submit" value="Zeiten anzeigen" class="btn btn-primary btn-lg">
<!-- Button zum Anzeigen der PDF -->
<input type="submit" name="action" value="PDF anzeigen" class="btn btn-primary btn-lg" formtarget="_blank">
<?php if (is_admin_user()): ?>
<input type="submit" name="action" value="Alle PDFs anzeigen" class="btn btn-secondary btn-lg" formtarget="_blank">
<?php endif; ?>
</form>
@@ -150,4 +160,4 @@ if ($selectedMonth && $selectedUser) {
</div>
</div>
<?php include 'footer.php'; ?>
<?php include 'footer.php'; ?>