mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
rename thanks.php to recapitulatif.php in admin and partage
This commit is contained in:
@@ -10,7 +10,7 @@ public/admin/
|
||||
├── add.php # Add new thesis form
|
||||
├── edit.php # Edit existing thesis form
|
||||
├── import.php # CSV import form
|
||||
├── thanks.php # Thank you page after submission
|
||||
├── recapitulatif.php # Recap page after submission
|
||||
├── actions/ # Backend processing scripts (no HTML output)
|
||||
│ ├── formulaire.php # Process thesis submission from add.php
|
||||
│ └── publish.php # Toggle publish/unpublish status
|
||||
@@ -30,7 +30,7 @@ Files that display HTML to users:
|
||||
- **add.php** - Form to add a new thesis
|
||||
- **edit.php** - Form to edit an existing thesis
|
||||
- **import.php** - CSV import interface
|
||||
- **thanks.php** - Success confirmation page
|
||||
- **recapitulatif.php** - Success confirmation page
|
||||
|
||||
### Backend Scripts (actions/)
|
||||
Files that process forms and redirect (no HTML output):
|
||||
@@ -47,7 +47,7 @@ Reusable HTML components:
|
||||
### Adding a Thesis
|
||||
1. User visits `add.php` (displays form)
|
||||
2. User submits form to `actions/formulaire.php` (processes data)
|
||||
3. On success, redirects to `thanks.php?id=123`
|
||||
3. On success, redirects to `recapitulatif.php?id=123`
|
||||
4. On error, redirects back to `add.php` with error message
|
||||
|
||||
### Publishing/Unpublishing
|
||||
@@ -85,7 +85,7 @@ Usage:
|
||||
- `/admin/add.php` - Add new thesis
|
||||
- `/admin/edit.php?id=123` - Edit thesis #123
|
||||
- `/admin/import.php` - Import CSV
|
||||
- `/admin/thanks.php?id=123` - Thank you page
|
||||
- `/admin/recapitulatif.php?id=123` - Recap page
|
||||
|
||||
Backend actions (not directly accessed):
|
||||
- `/admin/actions/formulaire.php` - Form processor
|
||||
|
||||
@@ -62,5 +62,5 @@ require_once APP_ROOT . '/templates/head.php';
|
||||
if (!$studentMode) {
|
||||
include APP_ROOT . '/templates/header.php';
|
||||
}
|
||||
include APP_ROOT . '/templates/admin/thanks.php';
|
||||
include APP_ROOT . '/templates/admin/recapitulatif.php';
|
||||
require_once APP_ROOT . '/templates/admin/footer.php';
|
||||
@@ -5,7 +5,7 @@
|
||||
* Routes:
|
||||
* /partage/<slug> — Render the share-link form (or password gate)
|
||||
* /partage/<slug>/submit — POST endpoint for form submissions via share link
|
||||
* /partage/thanks.php?id=N — Post-submission confirmation page
|
||||
* /partage/recapitulatif.php?id=N — Post-submission confirmation page
|
||||
*/
|
||||
require_once __DIR__ . '/../../bootstrap.php';
|
||||
|
||||
@@ -21,10 +21,10 @@ $parts = explode('/', $path);
|
||||
$slug = $parts[0] ?? '';
|
||||
$action = $parts[1] ?? '';
|
||||
|
||||
// Special route: /partage/thanks?id=N
|
||||
if ($slug === 'thanks' || $slug === 'thanks.php') {
|
||||
// Special route: /partage/recapitulatif?id=N
|
||||
if ($slug === 'recapitulatif' || $slug === 'recapitulatif.php') {
|
||||
App::boot();
|
||||
require_once __DIR__ . '/thanks.php';
|
||||
require_once __DIR__ . '/recapitulatif.php';
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -527,7 +527,7 @@ function handleShareLinkSubmission(string $slug): void
|
||||
$_SESSION['share_email_sent'] = $emailSent;
|
||||
|
||||
// Redirect to thanks page
|
||||
header('Location: /partage/thanks?id=' . urlencode((string)$thesisId));
|
||||
header('Location: /partage/recapitulatif?id=' . urlencode((string)$thesisId));
|
||||
exit();
|
||||
} catch (Exception $e) {
|
||||
$logger->logError('partage', $e->getMessage(), [
|
||||
|
||||
Reference in New Issue
Block a user