Commit Graph

3 Commits

Author SHA1 Message Date
Claude
132d2c3a34 Add delete message action to staff portal
Adds a Delete button to each message card in the staff inbox so staff
can remove spam or dead-end submissions. Confirmation dialog (via
JS confirm()) prevents accidental deletions. Implementation:

- POST handler: DELETE FROM contacts WHERE id = ? (parameterized)
- .btn--danger CSS variant (red-tinted, matches dark theme)
- Delete button rendered in every message footer alongside existing
  Mark as read action

https://claude.ai/code/session_015wpwmheufcxkBuXivrSHhd
2026-03-01 03:27:28 +00:00
Claude
5c8c406082 Update contact subject dropdown to match actual services; update README
Contact form subject options now match the five service lines on the site:
New Project Inquiry, Mesh Networking, Managed Services, Structured
Cabling, Access Control, IP Camera Systems, Technical Support, Other.
Removed the old ISP-generic options (billing, coverage, new-service).
Updated $subject_labels in admin-inbox.php to match.

README updates:
- ADMIN_PASS added to web container env vars table and env vars section
- Project structure updated to include db.php and admin-inbox.php
- Milestone 1 contact form item updated to note MySQL storage
- Milestone 4 marks contact DB storage and staff inbox as complete;
  email notification remains as the next open item

https://claude.ai/code/session_015wpwmheufcxkBuXivrSHhd
2026-03-01 03:14:02 +00:00
Claude
40e3f73aaf Add contact form DB storage and hidden staff inbox
- contact.php now inserts submissions into MySQL via PDO prepared
  statements; raw values stored (htmlspecialchars moved to output only)
- www/includes/db.php: shared PDO helper with auto-migration that adds
  the is_read column to existing deployments without a full DB reset
- docker/mysql/init.sql: added is_read TINYINT column to contacts table
  for fresh deploys
- www/pages/admin-inbox.php: self-contained staff inbox at /staff-portal
  with session-based password login, per-message mark-as-read, and
  mark-all-read; unread count shown in browser tab title
- index.php: routes /staff-portal before public header/footer so the
  admin page is fully standalone
- docker-compose.yml: ADMIN_PASS env var wired to web container

Set ADMIN_PASS in .env (gitignored) before deploying.
If the DB volume already exists, the auto-migration in db.php will
add the is_read column automatically on first request.

https://claude.ai/code/session_015wpwmheufcxkBuXivrSHhd
2026-03-01 03:05:18 +00:00