diff --git a/back.index.php b/back.index.php deleted file mode 100644 index 367ed28..0000000 --- a/back.index.php +++ /dev/null @@ -1,160 +0,0 @@ -register(); -$mailLoader->register(); - -use Helpers\Config; -use SimpleMail\SimpleMail; - -$config = new Config; -$config->load('./config/config.php'); - -//check secu code -$number_1 = rand(1, 9); -$number_2 = rand(1, 9); -$answer = substr(md5($number_1+$number_2),5,10); -// - - -if ($_SERVER['REQUEST_METHOD'] === 'POST') { - $name = stripslashes(trim($_POST['form-name'])); - $email = stripslashes(trim($_POST['form-email'])); - $phone = stripslashes(trim($_POST['form-phone'])); - $subject = stripslashes(trim($_POST['form-subject'])); - $message = stripslashes(trim($_POST['form-message'])); - $pattern = '/[\r\n]|Content-Type:|Bcc:|Cc:/i'; - - if (preg_match($pattern, $name) || preg_match($pattern, $email) || preg_match($pattern, $subject)) { - die("Header injection detected"); - } - - $emailIsValid = filter_var($email, FILTER_VALIDATE_EMAIL); - - if ($name && $email && $emailIsValid && $subject && $message) { - $mail = new SimpleMail(); - - $mail->setTo($config->get('emails.to')); - $mail->setFrom($config->get('emails.from')); - $mail->setSender($name); - $mail->setSubject($config->get('subject.prefix') . ' ' . $subject); - - $body = " - - - - - - -

{$subject}

-

{$config->get('fields.name')}: {$name}

-

{$config->get('fields.email')}: {$email}

-

{$config->get('fields.phone')}: {$phone}

-

{$config->get('fields.message')}: {$message}

- - "; - - $mail->setHtml($body); - $mail->send(); - - $emailSent = true; - } else { - $hasError = true; - } -} -?> - - - Echosystem.fr Contact Form - - - - - - - -
-

Contact Form

-

Echosystem.fr.

-
- -
-
get('messages.success'); ?>
-
- - -
-
get('messages.error'); ?>
-
- - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
-
-To help prevent spam, please enter the answer to this question:

- + = - -
-
-
- - - - -
- - - - - - - - - - -