thanks.php 499 B

12345678910111213141516171819
  1. <?php
  2. require_once('../templates/templates.php');
  3. require_once('../controller/forms.php');
  4. require_once('../controller/validator.php');
  5. if (!empty($_GET)) {
  6. Validator::check(['id'], $_GET);
  7. $id = Validator::str($_GET['id']);
  8. try {
  9. $context = getFormThanks($id);
  10. $template = getTemplate('thanks.html');
  11. echo parseTemplate($template,$context);
  12. } catch (Exception $e) {
  13. http_response_code(404);
  14. exit;
  15. }
  16. } else {
  17. header('Location: /');
  18. }