parent
285a4170f7
commit
3dacfdbbef
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1,20 @@
|
||||
/** vide */
|
||||
.userCheckBlue {
|
||||
display: none;
|
||||
}
|
||||
.userOuter{
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
width: 50%;
|
||||
border-radius: 2px;
|
||||
border: 1px solid;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
.userOuter{
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.userInner{
|
||||
display: inline-block;
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
/**
|
||||
* This file is part of DeltaCMS.
|
||||
* For full copyright and license information, please see the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
* @author Sylvain Lelièvre <lelievresylvain@free.fr>
|
||||
* @copyright Copyright (C) 2021-2022, Sylvain Lelièvre
|
||||
* @license GNU General Public License, version 3
|
||||
* @link https://deltacms.fr/
|
||||
*
|
||||
* Delta was created from version 11.2.00.24 of ZwiiCMS
|
||||
* @author Rémi Jean <remi.jean@outlook.com>
|
||||
* @copyright Copyright (C) 2008-2018, Rémi Jean
|
||||
* @author Frédéric Tempez <frederic.tempez@outlook.com>
|
||||
* @copyright Copyright (C) 2018-2021, Frédéric Tempez
|
||||
*/
|
||||
|
||||
|
||||
/* Création et mise à jour du cookie sur modification d'un input */
|
||||
$( ".humanBot" ).mouseleave(function() {
|
||||
const d = new Date();
|
||||
time = d.getTime();
|
||||
document.cookie = "evtC = " + time + ";SameSite=Strict";
|
||||
});
|
||||
|
||||
/* Cookie supplémentaire pour autoremplissage des champs */
|
||||
$( ".humanBot" ).change(function() {
|
||||
const d = new Date();
|
||||
time = d.getTime();
|
||||
document.cookie = "evtX = " + time + ";SameSite=Strict";
|
||||
});
|
||||
|
||||
/* Création d'un cookie à l'ouverture de la page formulaire*/
|
||||
$(document).ready(function(){
|
||||
const d = new Date();
|
||||
time = d.getTime();
|
||||
document.cookie = "evtO = " + time + ";SameSite=Strict";
|
||||
});
|
||||
|
||||
/* Création d'un cookie à la validation de la checkbox 'je ne suis pas un robot'*/
|
||||
$( ".humanCheck" ).click(function() {
|
||||
const d = new Date();
|
||||
time = d.getTime();
|
||||
document.cookie = "evtH = " + time + ";SameSite=Strict";
|
||||
});
|
||||
|
||||
/* Création d'un cookie quand on arrive sur la checkbox 'je ne suis pas un robot' */
|
||||
$( ".humanCheck" ).mouseenter(function() {
|
||||
const d = new Date();
|
||||
time = d.getTime();
|
||||
document.cookie = "evtA = " + time + ";SameSite=Strict";
|
||||
});
|
||||
|
||||
/* Création d'un cookie quand on quitte la checkbox 'je ne suis pas un robot' */
|
||||
$( ".humanCheck" ).mouseleave(function() {
|
||||
const d = new Date();
|
||||
time = d.getTime();
|
||||
document.cookie = "evtS = " + time + ";SameSite=Strict";
|
||||
});
|
||||
|
||||
/* Création d'un cookie à la validation du formulaire */
|
||||
$( ".humanBotClose" ).click(function() {
|
||||
const d = new Date();
|
||||
time = d.getTime();
|
||||
document.cookie = "evtV = " + time + ";SameSite=Strict";
|
||||
});
|
||||
|
||||
/* Affecter la couleur de bordure des blocs ou du fond à la class formOuter */
|
||||
$(document).ready(function(){
|
||||
borderColor = "<?php echo $this->getData(['theme', 'block', 'borderColor']); ?>";
|
||||
bgColor = "<?php echo $this->getData(['theme', 'site', 'backgroundColor']); ?>";
|
||||
$(".userOuter").css("border-color", borderColor);
|
||||
/* Modifier la couleur au survol */
|
||||
$( ".userOuter" ).mouseenter(function() {
|
||||
$(".userOuter").css("background-color", borderColor);
|
||||
});
|
||||
$( ".userOuter" ).mouseleave(function() {
|
||||
$(".userOuter").css("background-color", bgColor);
|
||||
});
|
||||
});
|
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
session_start();
|
||||
if ( !defined('ABSPATH') ) define('ABSPATH', dirname(__FILE__) . '/');
|
||||
|
||||
function random($tab) {
|
||||
return $tab[array_rand($tab)];
|
||||
}
|
||||
|
||||
$chars = '0123456789';
|
||||
|
||||
$char1 = mt_rand( 0, strlen($chars) - 1 );
|
||||
$char2 = mt_rand( 0, strlen($chars) - 1 );
|
||||
$_SESSION['captcha'] = md5((int)$char1 + (int)$char2);
|
||||
|
||||
// polices utilisées
|
||||
$fonts = glob('polices/*.woff');
|
||||
// création de l'image captcha
|
||||
$image = imagecreatefrompng('captcha.png');
|
||||
// couleurs des caractères
|
||||
$colors = array ( imagecolorallocate($image, 238, 238, 238),
|
||||
imagecolorallocate($image, 51, 51, 51),
|
||||
imagecolorallocate($image, 0, 102, 153),
|
||||
imagecolorallocate($image, 204, 0, 51),
|
||||
imagecolorallocate($image, 255, 51, 51),
|
||||
imagecolorallocate($image, 51, 255, 51),
|
||||
imagecolorallocate($image, 255, 255, 51) );
|
||||
// positions, polices, caractères et couleurs randomisées
|
||||
imagettftext($image, 28, -10, 7, 50, random($colors), ABSPATH .'/'. random($fonts), $char1);
|
||||
imagettftext($image, 28, 0, 50, 50, random($colors), ABSPATH .'/'. 'polices/Eskiula.woff', '+');
|
||||
imagettftext($image, 28, -35, 75, 50, random($colors), ABSPATH .'/'. random($fonts), $char2);
|
||||
imagettftext($image, 28, 0, 125, 50, random($colors), ABSPATH .'/'. 'polices/Eskiula.woff', '=');
|
||||
|
||||
header('Content-Type: image/png');
|
||||
imagepng($image);
|
||||
imagedestroy($image);
|
||||
?>
|
After Width: | Height: | Size: 20 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |