changes captcha

This commit is contained in:
Fred Tempez 2023-10-12 18:38:13 +02:00
parent eeb2f78770
commit 74f33031a8
2 changed files with 6 additions and 5 deletions

View File

@ -12,6 +12,7 @@
- Restaure la gestion d'erreur à l'étape 4 de la mise à jour automatique.
- Nouvelles tailles d'écran en pourcentages de 70% à 100% par pas de 5%.
- Déplacement de la fonction signature de la fonction core.php.
- Doublement de la taille des opérateurs dans le captcha de la fenêtre de login.
## Version 13.0.04

View File

@ -93,19 +93,19 @@ class template
// Icône de l'opérateur et calcul du résultat
switch ($operator) {
case 1:
$operator = template::ico('plus');
$operator = template::ico('plus', ['fontSize' => '2em;']);
$result = $firstNumber + $secondNumber;
break;
case 2:
$operator = template::ico('minus');
$operator = template::ico('minus', ['fontSize' => '2em;']);
$result = $firstNumber - $secondNumber;
break;
case 3:
$operator = template::ico('cancel');
$operator = template::ico('cancel', ['fontSize' => '2em;']);
$result = $firstNumber * $secondNumber;
break;
case 4:
$operator = template::ico('divide');
$operator = template::ico('divide', ['fontSize' => '2em;']);
$limit2 = [10, 10, 6, 5, 4, 3, 2, 2, 2, 2];
for ($i = 1; $i <= $firstNumber; $i++) {
$limit = $limit2[$i - 1];
@ -134,7 +134,7 @@ class template
// Label
$html .= self::label(
$attributes['id'],
'<img class="captcha' . ucFirst($attributes['type']) . '" src="' . helper::baseUrl(false) . 'site/tmp/' . $firstLetter . '.png" />&nbsp;<strong>' . $operator . '</strong>&nbsp;<img class="captcha' . ucFirst($attributes['type']) . '" src="' . helper::baseUrl(false) . 'site/tmp/' . $secondLetter . '.png" />' . template::ico('eq'),
'<img class="captcha' . ucFirst($attributes['type']) . '" src="' . helper::baseUrl(false) . 'site/tmp/' . $firstLetter . '.png" />&nbsp;<strong>' . $operator . '</strong>&nbsp;<img class="captcha' . ucFirst($attributes['type']) . '" src="' . helper::baseUrl(false) . 'site/tmp/' . $secondLetter . '.png" />' . template::ico('eq', ['fontSize' => '2em;']),
[
'help' => $attributes['help']
]