1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-25 22:17:29 +02:00

Amélioration du code de la page de connexion

This commit is contained in:
galaxyoyo
2019-09-09 00:41:52 +02:00
parent fbabdff69c
commit 190039a5e8
15 changed files with 270 additions and 259 deletions

View File

@ -42,14 +42,8 @@ function saveSolution() {
if (!is_dir("$LOCAL_PATH/files") && !mkdir("$LOCAL_PATH/files"))
return "Les droits sont insuffisants. Veuillez contacter l'administrateur du serveur.";
$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"));
if (!rename($file["tmp_name"], "$LOCAL_PATH/files/$id"))