From 2009ab8d25df841dab57c99f209f44f78b40f336 Mon Sep 17 00:00:00 2001 From: Olivier Legat Date: Thu, 10 Mar 2022 11:54:35 +0100 Subject: [PATCH] Squashed commit of the following: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 8d1579b08c24af6ffc630ce204a19fc6ce4c40ef Author: Olivier Legat Date: Thu Mar 10 11:53:54 2022 +0100 couleur de marge du schema performances commit 8b19d310c4d618e865d68383baa3813bee5cc74c Author: Olivier Legat Date: Thu Mar 10 11:49:38 2022 +0100 picto certifications tous à la meme taille (hauteur) commit b5193501cbeb517b8b8cf42de6610914f194da4a Author: Olivier Legat Date: Thu Mar 10 11:46:19 2022 +0100 administration page histoir de savoir faire commit fade6d23a992ec13dce44e1814362d382ecc196f Author: Olivier Legat Date: Mon Mar 7 18:07:06 2022 +0100 binde recaptcha to cookie settings commit 898ebe03f5a0d807733e532527787ad64c2c578d Author: Olivier Legat Date: Mon Mar 7 17:18:47 2022 +0100 index RH administrables commit a2c950798f337cc30c80717f9fa654844504c498 Author: Olivier Legat Date: Mon Mar 7 17:17:56 2022 +0100 ignore pièces jointe de mail de contact commit a4ca5171932506dda2513b26c81432619c016dfd Author: Olivier Legat Date: Mon Mar 7 17:17:32 2022 +0100 envoi de mail de contact --- .env-example | 27 +++++ .gitignore | 1 + wp-config.php | 6 +- wp-content/pj/.gitkeep | 0 .../themes/pole-sbv/contact_template.php | 18 +-- wp-content/themes/pole-sbv/css/main.css | 2 +- wp-content/themes/pole-sbv/css/style.min.css | 1 + wp-content/themes/pole-sbv/footer.php | 4 +- .../themes/pole-sbv/metiers_template.php | 23 ++-- .../pole-sbv/savoirfaire_en_template.php | 94 ++++----------- .../themes/pole-sbv/savoirfaire_template.php | 112 ++++++------------ 11 files changed, 115 insertions(+), 173 deletions(-) create mode 100644 .env-example create mode 100644 wp-content/pj/.gitkeep 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 .= ""; $subject = "Nouveau message du site SBV"; - wp_mail(array(CONTACT_MAIL), $subject, $bodyMail, "", $pj); - + $envoiDone = wp_mail(explode(",",CONTACT_MAIL), $subject, $bodyMail, "", $pj); $envoiDone = true; } @@ -281,7 +275,7 @@ function showContact($items) -
+

@@ -372,4 +366,4 @@ function showContact($items) }); }); - + diff --git a/wp-content/themes/pole-sbv/css/main.css b/wp-content/themes/pole-sbv/css/main.css index 018de32f..e3a0257d 100644 --- a/wp-content/themes/pole-sbv/css/main.css +++ b/wp-content/themes/pole-sbv/css/main.css @@ -115,7 +115,7 @@ h3 { .schema01 { max-width:100%; - background-color:#575756; + background-color:#58585a; /* //display:flex; */ text-align:center; text-align: -webkit-center; diff --git a/wp-content/themes/pole-sbv/css/style.min.css b/wp-content/themes/pole-sbv/css/style.min.css index 83264749..acfb6a89 100644 --- a/wp-content/themes/pole-sbv/css/style.min.css +++ b/wp-content/themes/pole-sbv/css/style.min.css @@ -859,6 +859,7 @@ h2.section-title { .pictures-holder .picture-holder img { display: block; margin: 0 auto; + height: 100px; } .marked-red { diff --git a/wp-content/themes/pole-sbv/footer.php b/wp-content/themes/pole-sbv/footer.php index d819f5e1..96f197bc 100644 --- a/wp-content/themes/pole-sbv/footer.php +++ b/wp-content/themes/pole-sbv/footer.php @@ -130,11 +130,11 @@ 'name': "API - reCAPTCHA", 'description': '', 'link': 'https://policies.google.com/privacy', - 'cookies': ['NID', '__Secure-3PAPISID', '__Secure-3PSID', '__Secure-3PSIDCC'], + 'cookies': ['NID', '__Secure-3PAPISID', '__Secure-3PSID', '__Secure-3PSIDCC', '_GRECAPTCHA'], 'script': function () { (function (d, t) { let g = d.createElement(t), s = d.getElementsByTagName(t)[0]; - g.src = 'https://www.google.com/recaptcha/api.js?render=6LdCuTQUAAAAALjD2gh_Aqos348_bRQEtBiDIy82'; + g.src = 'https://www.google.com/recaptcha/api.js'; s.parentNode.insertBefore(g, s) }(document, 'script')); } diff --git a/wp-content/themes/pole-sbv/metiers_template.php b/wp-content/themes/pole-sbv/metiers_template.php index bb49d1c9..b51351da 100644 --- a/wp-content/themes/pole-sbv/metiers_template.php +++ b/wp-content/themes/pole-sbv/metiers_template.php @@ -4,7 +4,10 @@ * * @package WordPress */ -get_header(); ?> +get_header(); +global $post; +$post->ID +?>
@@ -88,7 +91,7 @@ get_header(); ?>
- + " alt="">
@@ -97,7 +100,7 @@ get_header(); ?>
- + " alt="">
@@ -106,7 +109,7 @@ get_header(); ?>
- + " alt="">
@@ -115,7 +118,7 @@ get_header(); ?>
- + " alt="">
@@ -124,7 +127,7 @@ get_header(); ?>
- + " alt="">
@@ -133,7 +136,7 @@ get_header(); ?>
- + " alt="">
@@ -142,7 +145,7 @@ get_header(); ?>
- + " alt="">
@@ -151,7 +154,7 @@ get_header(); ?>
- + " alt="">
diff --git a/wp-content/themes/pole-sbv/savoirfaire_en_template.php b/wp-content/themes/pole-sbv/savoirfaire_en_template.php index b286f660..4e8ae5d4 100644 --- a/wp-content/themes/pole-sbv/savoirfaire_en_template.php +++ b/wp-content/themes/pole-sbv/savoirfaire_en_template.php @@ -4,7 +4,10 @@ * * @package WordPress */ -get_header(); ?> +get_header(); +global $post; +$post->ID +?>