
Forum » » Questions » » chat
Posté : 06-09-2023 10:09 
function check_id(string $chaine): array
{
global $user;
// Vérifie si la chaîne es t du style NOMBRE-NOMBRE.
if (count(str_split($chaine, "-")) ==& nbsp;2 && is_numeric(explode("-", $chaine)[0]) & ;& is_numeric(explode("-", $chaine)[1])) {
// La chaîne est du style NOMBRE-NOMBRE.
$userid = explode(" -", $chaine);
$cookie=cookiedecode($user);
if ($cookie[1] !==& nbsp;$userid[0] || $cookie[1] !== $userid[0]){
die() ;
}
}
// Vérifie si la chaîne es t un nombre compris entre -127 et 126.
if (is_numeric($chaine) && abs ($chaine) <= 126) {
// La chaîne est un nombre compris entre -127 et 126.
if (!autorisation($chain e)) die();
}
die();
}
check_id($id);
Cet article provient de NPDS REvolution 16
https://lab.grottes-et-karsts-de-chine.org/viewtopic.php?topic=26844&forum=9