mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-25 20:57:25 +02:00
Amélioration du code de la page de connexion
This commit is contained in:
@ -24,14 +24,8 @@ if (isset($_POST["select"])) {
|
||||
$sols_req->execute([$team->getId(), $team->getTournamentId()]);
|
||||
while (($sol_data = $sols_req->fetch()) !== false) {
|
||||
$old_id = $sol_data["file_id"];
|
||||
$alphabet = "abcdefghijklmnopqrstuvwxyz0123456789";
|
||||
|
||||
do {
|
||||
$id = "";
|
||||
for ($i = 0; $i < 64; ++$i) {
|
||||
$id .= $alphabet[rand(0, strlen($alphabet) - 1)];
|
||||
}
|
||||
}
|
||||
do
|
||||
$id = genRandomPhrase(64);
|
||||
while (file_exists("$LOCAL_PATH/files/$id"));
|
||||
|
||||
copy("$LOCAL_PATH/files/$old_id", "$LOCAL_PATH/files/$id");
|
||||
|
Reference in New Issue
Block a user