PDF Ausgabe erweitert
This commit is contained in:
@@ -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'; ?>
|
||||
|
||||
Reference in New Issue
Block a user