attendance
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| attendance [2026/01/15 20:25] – admin | attendance [2026/06/17 00:18] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | <html> | + | {{url> |
| - | <iframe src="https:// | + | |
| - | <p> | + | |
| - | (If the iframe fails to load: <a href=" | + | |
| - | </ | + | |
| - | </ | + | |
| - | <?php | + | (If the iframe fails to load: [[https://nerdcruft.net/mlug/]]) |
| - | // === CONFIG === | + | |
| - | $attendanceDir = DOKU_INC . ' | + | |
| - | if (!is_dir($attendanceDir)) { | + | |
| - | mkdir($attendanceDir, | + | |
| - | } | + | |
| - | + | ||
| - | // File name based on current month (e.g. attendance_2026_01.txt) | + | |
| - | $monthKey = date(' | + | |
| - | $file = $attendanceDir . " | + | |
| - | + | ||
| - | // Handle form submission | + | |
| - | if ($_SERVER[' | + | |
| - | $name = trim(strip_tags($_POST[' | + | |
| - | if ($name !== '' | + | |
| - | file_put_contents($file, | + | |
| - | } | + | |
| - | } | + | |
| - | + | ||
| - | // Load existing attendance | + | |
| - | $attendees = []; | + | |
| - | if (file_exists($file)) { | + | |
| - | $attendees = file($file, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); | + | |
| - | } | + | |
| - | ?> | + | |
| - | + | ||
| - | <form method=" | + | |
| - | <input type=" | + | |
| - | <button type=" | + | |
| - | </ | + | |
| - | + | ||
| - | <?php if (!empty($attendees)): | + | |
| - | < | + | |
| - | < | + | |
| - | <?php foreach ($attendees as $person): ?> | + | |
| - | < | + | |
| - | <?php endforeach; ?> | + | |
| - | </ | + | |
| - | <?php else: ?> | + | |
| - | <p>No attendance recorded yet this month.</ | + | |
| - | <?php endif; ?> | + | |
attendance.1768469116.txt.gz · Last modified: by admin
