diff --git a/.env-example b/.env-example
new file mode 100644
index 00000000..390d3790
--- /dev/null
+++ b/.env-example
@@ -0,0 +1,27 @@
+ENVIRONMENT=local
+# DB
+DB_NAME=pole-sbv_09_2021
+DB_USER=root
+DB_PASSWORD=
+DB_HOST=127.0.0.1
+DB_PREFIX=ldc_
+# DEBUG
+WP_DEBUG=true
+SCRIPT_DEBUG=true
+WP_DEBUG_DISPLAY=true
+# UTILS
+WP_HTTP_BLOCK_EXTERNAL=true
+# EMAIL
+SMTP_HOST=localhost
+SMTP_PORT=1025
+SMTP_AUTH=true
+SMTP_USER=null
+SMTP_PASS=null
+SMTP_SECURE=
+
+#RECAPTCHA
+RECAPTCHA_SITE=
+RECAPTCHA_KEY=
+
+#CONTACT RECIPIENTS
+CONTACT_MAIL="loic.harnieh@pole-sbv.fr, anne-lise.clavel@pole-sbv.fr"
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 03c83de3..0aaa307e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,5 +25,6 @@ pole-sbv-content/uploads/*
!pole-sbv-content/uploads/.htaccess
!pole-sbv-content/uploads/index.php
wp-content/uploads/*
+wp-content/pj/*
!wp-content/uploads/.htaccess
!wpcontent/uploads/index.php
diff --git a/wp-config.php b/wp-config.php
index 7bc0571a..d751e4af 100755
--- a/wp-config.php
+++ b/wp-config.php
@@ -129,9 +129,9 @@ define('SMTP_SECURE', $_ENV['SMTP_SECURE']);
define('SENDER_MAIL', 'noreply@pole-sbv.fr');
define('SENDERNAME_MAIL', 'SBV');
define('FROM_MAIL', 'noreply@pole-sbv.fr');
-define("CONTACT_MAIL", "loic.harnieh@pole-sbv.fr, anne-lise.clavel@pole-sbv.fr");
-define('CONTACT_RECIPIENT', $_ENV['CONTACT_RECIPIENT']);
-define('MAIL_PASSERELLE', $_ENV['MAIL_PASSERELLE']);
+define("CONTACT_MAIL", $_ENV['CONTACT_MAIL']);
+//define('CONTACT_RECIPIENT', $_ENV['CONTACT_RECIPIENT']);
+//define('MAIL_PASSERELLE', $_ENV['MAIL_PASSERELLE']);
/**
* For developers: WordPress debugging mode.
diff --git a/wp-content/pj/.gitkeep b/wp-content/pj/.gitkeep
new file mode 100644
index 00000000..e69de29b
diff --git a/wp-content/themes/pole-sbv/contact_template.php b/wp-content/themes/pole-sbv/contact_template.php
index af194ebb..0ba46a81 100644
--- a/wp-content/themes/pole-sbv/contact_template.php
+++ b/wp-content/themes/pole-sbv/contact_template.php
@@ -5,11 +5,6 @@
* @package WordPress
*/
-
-
-
-
-
if('POST' == $_SERVER['REQUEST_METHOD'] && !empty($_POST['action']) && $_POST['action'] == "message_conso") {
$taille_maxi = 3145728; // MAX_FILE_SIZE = 3Mo
$validExtensions = array('.jpg', '.jpeg', '.png','.pdf');
@@ -30,8 +25,8 @@ if('POST' == $_SERVER['REQUEST_METHOD'] && !empty($_POST['action']) && $_POST['
$type = htmlspecialchars($_POST['contacttype'] ?? '');
$message = htmlspecialchars($_POST['message']);
if(isset($_POST['g-recaptcha-response'])) {
- $key = "6LdCuTQUAAAAALJ_1ZSa46Bd2TTCWi186yy2w09C";
- $secret = "6LdCuTQUAAAAALjD2gh_Aqos348_bRQEtBiDIy82";
+ $key = $_ENV['RECAPTCHA_SITE'];
+ $secret = $_ENV['RECAPTCHA_KEY'];
if(isset($_SERVER["HTTP_X_FORWARDED_FOR"]) && $_SERVER["HTTP_X_FORWARDED_FOR"] != "") {
if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',')) {
$explode = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
@@ -46,7 +41,7 @@ if('POST' == $_SERVER['REQUEST_METHOD'] && !empty($_POST['action']) && $_POST['
$response = $_POST['g-recaptcha-response'];
$api_url = "https://www.google.com/recaptcha/api/siteverify?secret=". $secret. "&response=" . $response. "&remoteip=" . $remoteip ;
- $decode = json_decode(file_get_contents($api_url), true);
+ $decode = json_decode(file_get_contents($api_url), true);
if ($decode['success'] == true) {
if($nom != "" && $prenom != "" && $email != "" && $adresse != "" && $cp !="" && $ville !="") {
$nonce = $_POST['token'];
@@ -107,8 +102,7 @@ if('POST' == $_SERVER['REQUEST_METHOD'] && !empty($_POST['action']) && $_POST['
$bodyMail .= "Message :
".$message."
";
$bodyMail .= "