Digits & digit
This commit is contained in:
parent
daaa867dff
commit
fede03429e
@ -80,14 +80,14 @@ if (( $RFL == 1 ));then
|
|||||||
ADDNBR="${INPUT:0:1}"
|
ADDNBR="${INPUT:0:1}"
|
||||||
NAME+="_FIRST"
|
NAME+="_FIRST"
|
||||||
NEWINPUT=${NEWINPUT:0:$LENINPUT-1} # Do not show first INPUT NBR
|
NEWINPUT=${NEWINPUT:0:$LENINPUT-1} # Do not show first INPUT NBR
|
||||||
INSTRUCTIONS1="Écrivez le chiffre ${DIGITS[$ADDNBR]} puis"
|
INSTRUCTIONS1="Écrivez le chiffre ${DIGIT[$ADDNBR]} puis"
|
||||||
INSTRUCTIONS2="Recopiez de DROITE à GAUCHE ←"
|
INSTRUCTIONS2="Recopiez de DROITE à GAUCHE ←"
|
||||||
else
|
else
|
||||||
ADDNBR="${INPUT:$LENINPUT-1:1}"
|
ADDNBR="${INPUT:$LENINPUT-1:1}"
|
||||||
NAME+="_LAST"
|
NAME+="_LAST"
|
||||||
NEWINPUT=${NEWINPUT:1:$LENINPUT-1} # Do not show last INPUT NBR
|
NEWINPUT=${NEWINPUT:1:$LENINPUT-1} # Do not show last INPUT NBR
|
||||||
INSTRUCTIONS1="Recopiez de DROITE à GAUCHE ←"
|
INSTRUCTIONS1="Recopiez de DROITE à GAUCHE ←"
|
||||||
INSTRUCTIONS2="Terminez par le chiffre ${DIGITS[$ADDNBR]}"
|
INSTRUCTIONS2="Terminez par le chiffre ${DIGIT[$ADDNBR]}"
|
||||||
fi
|
fi
|
||||||
NAME+="-$ADDNBR"
|
NAME+="-$ADDNBR"
|
||||||
}
|
}
|
||||||
@ -130,12 +130,12 @@ else
|
|||||||
if (( $FALSENBR <= $TARGET ));then
|
if (( $FALSENBR <= $TARGET ));then
|
||||||
RESULT=$(( TARGET + FALSENBR ))
|
RESULT=$(( TARGET + FALSENBR ))
|
||||||
RESUME=$(( TARGET - FALSENBR ))
|
RESUME=$(( TARGET - FALSENBR ))
|
||||||
INSTRUCTIONS1="Calculez: ${DIGITS[FALSENBR]} + ${DIGITS[RESUME]}. Copiez..."
|
INSTRUCTIONS1="Calculez: ${DIGIT[FALSENBR]} + ${DIGIT[RESUME]}. Copiez..."
|
||||||
NAME="CALCULP-$FALSENBR-$RESUME"
|
NAME="CALCULP-$FALSENBR-$RESUME"
|
||||||
else
|
else
|
||||||
RESULT=$(( FALSENBR - TARGET ))
|
RESULT=$(( FALSENBR - TARGET ))
|
||||||
RESUME=$(( TARGET - RESULT ))
|
RESUME=$(( TARGET - RESULT ))
|
||||||
INSTRUCTIONS1="Calculez: ${DIGITS[RESULT]} + ${DIGITS[RESUME]}. Copiez..."
|
INSTRUCTIONS1="Calculez: ${DIGIT[RESULT]} + ${DIGIT[RESUME]}. Copiez..."
|
||||||
NAME="CALCULP-$RESULT-$RESUME"
|
NAME="CALCULP-$RESULT-$RESUME"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -150,9 +150,8 @@ INSTRUCTIONS2="...en remplaçant chaque X par la somme"
|
|||||||
# ****************************************************************************
|
# ****************************************************************************
|
||||||
|
|
||||||
MODULES=(CALCUL NOTIN REPLACE REVERSE)
|
MODULES=(CALCUL NOTIN REPLACE REVERSE)
|
||||||
NBRMODULES=${#MODULES[@]}
|
RMODULE=`seq 0 $((#MODULES[@]-1)) | sort -R | head -n 1`
|
||||||
RMODULE=`seq 0 $((NBRMODULES-1)) | sort -R | head -n 1`
|
#eval "${MODULES[RMODULE]}"
|
||||||
eval "${MODULES[RMODULE]}"
|
|
||||||
|
|
||||||
TEXT="$NEWINPUT"
|
TEXT="$NEWINPUT"
|
||||||
CHAPRILURI="/var/lib/ejabberd/chapril_captchas/${NAME}_${NEWINPUT}_${INPUT}.png"
|
CHAPRILURI="/var/lib/ejabberd/chapril_captchas/${NAME}_${NEWINPUT}_${INPUT}.png"
|
||||||
|
Loading…
Reference in New Issue
Block a user