diff options
author | Thedro Neely <thedroneely@gmail.com> | 2022-11-16 01:32:48 -0500 |
---|---|---|
committer | Thedro Neely <thedroneely@gmail.com> | 2022-11-16 01:32:48 -0500 |
commit | e6d95488be4310b8bd85854c541777bb26299658 (patch) | |
tree | a77802b60cc2c87414407170fd3528f83fe20638 /controllers | |
parent | 0ca13d03f3bca48f1f50119bbc6887f5c0ce43ed (diff) | |
download | edwinmattiacci.com-e6d95488be4310b8bd85854c541777bb26299658.tar.gz edwinmattiacci.com-e6d95488be4310b8bd85854c541777bb26299658.tar.bz2 edwinmattiacci.com-e6d95488be4310b8bd85854c541777bb26299658.zip |
app: Cleanup dead files and organize hierarchy
Diffstat (limited to 'controllers')
-rw-r--r-- | controllers/about.controller.php | 3 | ||||
-rw-r--r-- | controllers/comments.controller.php | 3 | ||||
-rw-r--r-- | controllers/contact.controller.php | 56 | ||||
-rw-r--r-- | controllers/index.controller.php | 3 | ||||
-rw-r--r-- | controllers/wall.controller.php | 3 |
5 files changed, 0 insertions, 68 deletions
diff --git a/controllers/about.controller.php b/controllers/about.controller.php deleted file mode 100644 index e65098f..0000000 --- a/controllers/about.controller.php +++ /dev/null @@ -1,3 +0,0 @@ -<?php - -require '../views/about.view.php'; diff --git a/controllers/comments.controller.php b/controllers/comments.controller.php deleted file mode 100644 index 6f4abfa..0000000 --- a/controllers/comments.controller.php +++ /dev/null @@ -1,3 +0,0 @@ -<?php - -require '../bootstrap/comments/comments.php'; diff --git a/controllers/contact.controller.php b/controllers/contact.controller.php deleted file mode 100644 index d953ff6..0000000 --- a/controllers/contact.controller.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php - -use PHPMailer\PHPMailer\PHPMailer; -use PHPMailer\PHPMailer\Exception; - -if ($_SERVER['REQUEST_METHOD'] === 'POST') { - - $submit = new Form(); - - $submit->name = $name = $_POST['26471'] ?? null; - $submit->email = $email = $_POST['26472'] ?? null; - $submit->message = $message = $_POST['26473'] ?? null; - $submit->spam = $spam = $_POST['agree'] ?? false; - - $validEmail = PHPMailer::validateAddress($submit->email, 'auto'); - - if ((bool) empty($submit->email) == true - || (bool) empty($submit->message) == true - ) { - include '../views/contact.view.php'; - return; - } - - if ((bool) $spam == true) { - error_log('Contact Form Spam: Error 403'); - return http_response_code(403); - } - - if ($validEmail === false ) { - $emailError = 'Invalid email: ' . "\r" . '<b>'. $submit->email . '</b>'; - include '../views/contact.view.php'; - return; - } - - $formSuccess = true; - - $name = null; - $email = null; - $message = null; - $spam = false; - - include '../views/contact.view.php'; - fastcgi_finish_request(); - - $contact['database']->insert( - 'contactform', [ - 'name' => $submit->name, - 'email' => $submit->email, - 'message' => $submit->message, - ] - ); - - return sendMail($submit->name, $submit->email, $submit->message); -} - -require '../views/contact.view.php'; diff --git a/controllers/index.controller.php b/controllers/index.controller.php deleted file mode 100644 index a4fa714..0000000 --- a/controllers/index.controller.php +++ /dev/null @@ -1,3 +0,0 @@ -<?php - -require '../views/index.view.php'; diff --git a/controllers/wall.controller.php b/controllers/wall.controller.php deleted file mode 100644 index bee3263..0000000 --- a/controllers/wall.controller.php +++ /dev/null @@ -1,3 +0,0 @@ -<?php - -require '../views/wall.view.php'; |