Masquer les images et leur dossier
This commit is contained in:
parent
9d444be061
commit
5fb003bae6
@ -55,11 +55,16 @@ class template {
|
|||||||
$secondNumber = rand ( 0 , count($letters)-1 );
|
$secondNumber = rand ( 0 , count($letters)-1 );
|
||||||
$result = $firstNumber + $secondNumber;
|
$result = $firstNumber + $secondNumber;
|
||||||
$result = password_hash($result, PASSWORD_BCRYPT);
|
$result = password_hash($result, PASSWORD_BCRYPT);
|
||||||
|
$firstLetter = uniqid();
|
||||||
|
$secondLetter = uniqid();
|
||||||
|
// Masquage image source
|
||||||
|
copy ('core/vendor/zwiico/png/'.$letters[$firstNumber] . '.png','site/tmp/' . $firstLetter . '.png');
|
||||||
|
copy ('core/vendor/zwiico/png/'.$letters[$secondNumber] . '.png','site/tmp/' . $secondLetter . '.png');
|
||||||
// Début du wrapper
|
// Début du wrapper
|
||||||
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
|
$html = '<div id="' . $attributes['id'] . 'Wrapper" class="inputWrapper ' . $attributes['classWrapper'] . '">';
|
||||||
// Label
|
// Label
|
||||||
$html .= self::label($attributes['id'],
|
$html .= self::label($attributes['id'],
|
||||||
'<img class="captchaNumber" src="core/vendor/zwiico/png/'.$letters[$firstNumber] . '.png" /> + <img class="captchaNumber" src="core/vendor/zwiico/png/' . $letters[$secondNumber] . '.png" /> = en chiffres ?', [
|
'<img class="captchaNumber" src="site/tmp/' . $firstLetter . '.png" /> + <img class="captchaNumber" src="site/tmp/' . $secondLetter . '.png" /> = en chiffres ?', [
|
||||||
'help' => $attributes['help']
|
'help' => $attributes['help']
|
||||||
]);
|
]);
|
||||||
// Notice
|
// Notice
|
||||||
|
Loading…
Reference in New Issue
Block a user