diff --git a/backup.php b/backup.php index 7ba0a17..db4d52e 100755 --- a/backup.php +++ b/backup.php @@ -25,8 +25,31 @@ if ($handle = opendir($backup_dir)) { } } closedir($handle); - // Sortieren: neueste zuerst - usort($files, fn($a, $b) => $b['mtime'] <=> $a['mtime']); + + // 🔸 Sortieren nach Datum im Dateinamen: DoMiLi_Backup_YYYY-MM[_x].pdf + usort($files, function ($a, $b) { + // Extrahiere YYYY-MM aus dem Dateinamen (ohne .pdf) + $nameA = pathinfo($a['name'], PATHINFO_FILENAME); + $nameB = pathinfo($b['name'], PATHINFO_FILENAME); + + // Regex: Suche nach 4 Ziffern, Bindestrich, 2 Ziffern + $dateA = null; + $dateB = null; + if (preg_match('/(\d{4}-\d{2})/', $nameA, $matchesA)) { + $dateA = $matchesA[1]; + } + if (preg_match('/(\d{4}-\d{2})/', $nameB, $matchesB)) { + $dateB = $matchesB[1]; + } + + // Wenn kein Datum gefunden: ans Ende schieben + if ($dateA === null && $dateB === null) return 0; + if ($dateA === null) return 1; // A hinter B + if ($dateB === null) return -1; // B hinter A + + // Absteigend sortieren: neuestes zuerst → "2025-07" > "2025-02" + return $dateB <=> $dateA; + }); } require_once 'inc/header.php'; diff --git a/backups/DoMiLi_Backup_2025-07.pdf b/backups/DoMiLi_Backup_2025-07.pdf new file mode 100755 index 0000000..ecf22cd Binary files /dev/null and b/backups/DoMiLi_Backup_2025-07.pdf differ diff --git a/backups/DoMiLi_Backup_2025-08.pdf b/backups/DoMiLi_Backup_2025-08.pdf new file mode 100755 index 0000000..f3b9bc2 Binary files /dev/null and b/backups/DoMiLi_Backup_2025-08.pdf differ diff --git a/backups/DoMiLi_Backup_2025-09.pdf b/backups/DoMiLi_Backup_2025-09.pdf new file mode 100755 index 0000000..57dab94 Binary files /dev/null and b/backups/DoMiLi_Backup_2025-09.pdf differ diff --git a/colors.php b/colors.php index 2696e6e..8ae859d 100755 --- a/colors.php +++ b/colors.php @@ -1,10 +1,5 @@ - Name Farbe - Anz + + + + Name + + + + + + Anzahl + + - Aktionen + - + +
+ + - -
- - + diff --git a/export.php b/export.php index b5363c8..630efcd 100755 --- a/export.php +++ b/export.php @@ -1,5 +1,5 @@ setTime(23, 59, 59); + +// Backup für manuelles erzeugen eines PDF in einem anderen Zeitabschnitt +//$berichtsMonatBeginn = new DateTime('2025-09-01 00:00:00'); +//$berichtsMonatEnde = new DateTime('2025-09-30 23:59:59'); + // === 2. Letzter Jahresabschluss === -$last_closing = '2020-01-01'; +$last_closing = '2025-01-01'; $res = mysqli_query($conn, "SELECT MAX(closing_date) AS last_date FROM penalty_closings"); if ($res && ($row = mysqli_fetch_assoc($res)) && !is_null($row['last_date'])) { $last_closing = $row['last_date']; @@ -33,7 +39,7 @@ while ($row = mysqli_fetch_assoc($resUsers)) { $userIds = array_keys($alleBenutzer); // === 4. Alle relevanten Daten (nur completed + attended=1) === -$bisDatum = $berichtsMonatEnde->format('Y-m-d'); +$bisDatum = $berichtsMonatEnde->format('Y-m-d H:i:s'); $stmt = mysqli_prepare($conn, " SELECT m.id AS meeting_id, m.meeting_date, mt.user_id, mt.wore_color, mt.paid, mt.birthday_pay @@ -59,8 +65,8 @@ $stmtMeta = mysqli_prepare($conn, " WHERE meeting_date >= ? AND meeting_date <= ? AND is_completed = 1 ORDER BY meeting_date "); -$startDate = $berichtsMonatBeginn->format('Y-m-d'); -$endDate = $berichtsMonatEnde->format('Y-m-d'); +$startDate = $berichtsMonatBeginn->format('Y-m-d H:i:s'); +$endDate = $berichtsMonatEnde->format('Y-m-d H:i:s'); mysqli_stmt_bind_param($stmtMeta, 'ss', $startDate, $endDate); mysqli_stmt_execute($stmtMeta); $resultMeta = mysqli_stmt_get_result($stmtMeta); diff --git a/kasse.php b/kasse.php index eb5dc9a..dc4776c 100755 --- a/kasse.php +++ b/kasse.php @@ -1,5 +1,4 @@ - - - ✓ In diesem Jahr bereits als Geburtstagszahler markiert. - - Geburtstag steht noch an – du kannst als Sonderzahler vorgeschlagen werden. - - Für automatische Sonderzahlung. - -
diff --git a/version.php b/version.php index a7a45ae..cab7fab 100755 --- a/version.php +++ b/version.php @@ -287,6 +287,7 @@ foreach ($releases as $rel) { require_once('inc/header.php'); ?> +
-
-
-

📋 Versionsübersicht

+

📋 Versionsübersicht

-
-
-

Release Notes

- - - -
-
+
+
+

Release Notes

+ + + +
+
- -
-
-
-
- - - -
- - -
Format: v1.4.2
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - Abbrechen -
-
+ +
+
+
+
+ + + +
+ + +
Format: v1.4.2
-
- +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + Abbrechen +
+ +
+
+ - -

Keine veröffentlichten Release Notes vorhanden.

- - -
-
-
- - - Entwurf - - aktuelle Version - -
-

Veröffentlicht am:

- - -

Neue Features:

-
    - -
  • - -
- - - -

Verbesserungen:

-
    - -
  • - -
- - - -

Behobene Fehler:

-
    - -
  • - -
- -
- - + +

Keine veröffentlichten Release Notes vorhanden.

+ + +
+
+
+ + + Entwurf + + aktuelle Version -
- - + +

Veröffentlicht am:

+ + +

Neue Features:

+
    + +
  • + +
+ + + +

Verbesserungen:

+
    + +
  • + +
+ + + +

Behobene Fehler:

+
    + +
  • + +
+ +
+ + + +
+ + -
-