Pages vues depuis 25/05/2001 : 106 255 848
Index du forum »» Questions »» chat
function check_id(string $chaine): array
{
global $user;
// Vérifie si la chaîne est du style NOMBRE-NOMBRE.
if (count(str_split($chaine, "-")) == 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] !== $userid[0] || $cookie[1] !== $userid[0]){
die();
}
}
// Vérifie si la chaîne est 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($chaine)) die();
}
die();
}
check_id($id);