diff options
author | Minteck <contact@minteck.org> | 2022-03-27 22:02:31 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-03-27 22:02:31 +0200 |
commit | fedae5a246fcfc0617f68acdf6be48a36223197d (patch) | |
tree | 91ea9e7e8fdf9a198bd886ecfa34bfa1200d82dc | |
parent | bf8cf96143ceec9ab44a73ac0d78a22734128240 (diff) | |
download | share-fedae5a246fcfc0617f68acdf6be48a36223197d.tar.gz share-fedae5a246fcfc0617f68acdf6be48a36223197d.tar.bz2 share-fedae5a246fcfc0617f68acdf6be48a36223197d.zip |
Commit
-rw-r--r-- | .DS_Store | bin | 0 -> 10244 bytes | |||
-rw-r--r-- | .idea/deployment.xml | 3 | ||||
-rw-r--r-- | delete/confirm/index.php | 4 | ||||
-rw-r--r-- | f/index.php | 26 | ||||
-rw-r--r-- | file/index.php | 2 |
5 files changed, 21 insertions, 14 deletions
diff --git a/.DS_Store b/.DS_Store Binary files differnew file mode 100644 index 0000000..3c77dd6 --- /dev/null +++ b/.DS_Store diff --git a/.idea/deployment.xml b/.idea/deployment.xml index d2268e2..b593882 100644 --- a/.idea/deployment.xml +++ b/.idea/deployment.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <project version="4"> - <component name="PublishConfigData" serverName="Familine (project level)" remoteFilesAllowedToDisappearOnAutoupload="false"> + <component name="PublishConfigData" autoUpload="Always" serverName="Familine (project level)" remoteFilesAllowedToDisappearOnAutoupload="false"> <serverData> <paths name="Familine (project level)"> <serverdata> @@ -10,5 +10,6 @@ </serverdata> </paths> </serverData> + <option name="myAutoUpload" value="ALWAYS" /> </component> </project>
\ No newline at end of file diff --git a/delete/confirm/index.php b/delete/confirm/index.php index 9f21db3..6419452 100644 --- a/delete/confirm/index.php +++ b/delete/confirm/index.php @@ -36,7 +36,7 @@ function fb() { header("Location: /delete/?i=" . $_GET['i']); die(); } else { - header("Location: /files"); + header("Location: /files/"); die(); } } @@ -63,5 +63,5 @@ if (array_search($file, $_CONF_USP['files']) !== false) { unset($_CONF_USP['files'][array_search($file, $_CONF_USP['files'])]); } file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/private/profiles/" . $_CONF_UID . ".json", json_encode($_CONF_USP, JSON_PRETTY_PRINT)); -header("Location: /files"); +header("Location: /files/"); die();
\ No newline at end of file diff --git a/f/index.php b/f/index.php index 9a3510b..04f4551 100644 --- a/f/index.php +++ b/f/index.php @@ -29,12 +29,18 @@ if ($_SERVER['SERVER_NAME'] !== "viewer.familine.minteck.org") { die(); } +function l($fr, $en = null) { + if (substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2) === "fr") { + return $fr; + } else return $en ?? $fr; +} + ?> <!DOCTYPE html> <html> <head> - <title>Accueil | Familine Partage</title> + <title><?= l("Accueil | Familine Partage", "Home | Familine Share") ?></title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script> @@ -43,13 +49,13 @@ if ($_SERVER['SERVER_NAME'] !== "viewer.familine.minteck.org") { <body> <div style="margin-top:50px;text-align:center;" class="container"> - <h1>Bienvenue sur Familine Partage !</h1> - <p>Familine Partage est une plateforme privée<sup>(1)</sup> de partage de fichiers. Si vous n'avez pas de code pour télécharger un fichier, vous pouvez utiliser votre compte Familine si vous en avez un. Si vous n'avez pas de compte Familine, vous ne pouvez pas utiliser Familine Partage<sup>(2)</sup>.</p> - <h2>Je dispose d'un code</h2> + <h1><?= l("Bienvenue sur Familine Partage !", "Welcome to Familine Share!") ?></h1> + <p><?= l("Familine Partage est une plateforme privée", "Familine Share is a private") ?><sup>1</sup><?= l(" de partage de fichiers. Si vous n'avez pas de code pour télécharger un fichier, vous pouvez utiliser votre compte Familine si vous en avez un. Si vous n'avez pas de compte Familine, vous ne pouvez pas utiliser Familine Partage", " file sharing platform. If you don't have the code of a file you want to download, you can use your Familine account if you have one. If you don't have one, you can't use Familine Share"); ?><sup>2</sup>.</p> + <h2><?= l("Je dispose d'un code", "I have a code") ?></h2> <div class="input-group mb-3" style="max-width:550px;margin-left:auto;margin-right:auto;font-size:26px;"> - <input type="text" class="form-control" id="fd" placeholder="Code du fichier" style="font-size:26px;"> + <input type="text" class="form-control" id="fd" placeholder="<?= l("Code du fichier", "File code") ?>" style="font-size:26px;"> <div class="input-group-append"> - <button class="btn btn-success" style="font-size:26px;" type="submit" onclick="location.href='/f/'+document.getElementById('fd').value;">Continuer</button> + <button class="btn btn-success" style="font-size:26px;" type="submit" onclick="location.href='/f/'+document.getElementById('fd').value;"><?= l("Continuer", "Continue") ?></button> </div> </div> <style> @@ -63,14 +69,14 @@ if ($_SERVER['SERVER_NAME'] !== "viewer.familine.minteck.org") { font-size: 26px; } </style> - <h2>Je ne dispose pas d'un code, mais j'ai un compte Familine</h2> - <p>Si vous avez un compte Familine, vous pouvez partager de nouveaux fichiers et voir les fichiers que vous avez partagés depuis le <a href="https://share.familine.minteck.org">tableau de bord Familine Partage</a>.</p> + <h2><?= l("Je ne dispose pas d'un code, mais j'ai un compte Familine", "I don't have a code, but I have a Familine account") ?></h2> + <p><?= l("Si vous avez un compte Familine, vous pouvez partager de nouveaux fichiers et voir les fichiers que vous avez partagés depuis le", "If you have a Familine account, you can share new files and access files you're sharing from the") ?> <a href="https://share.familine.minteck.org"><?= l("tableau de bord Familine Partage", "Familine Share dashboard") ?></a>.</p> </div> <div class="container"> <hr style="width:10%;margin-left:0;margin-top:50px;"> <small> - <sup>(1)</sup> L'utilisation de la plateforme est réservée aux personnes possédant un compte Familine et ne permet de partager que 200 Mo de fichiers à la fois.<br> - <sup>(2)</sup> Pour obtenir un compte Familine, vous devez envoyer une demande de création de compte <a href="https://familine.ddns.net/fwk/#/index.php/Sp%C3%A9cial:Demander_un_compte">depuis le site officiel de Familine</a>. + <sup>1</sup><?= l("L'utilisation de la plateforme est réservée aux personnes possédant un compte Familine et ne permet de partager que 200 Mo de fichiers à la fois.", "The use of this platform is reserved to people with a Familine account and can only share 200 MB of files at a time.") ?><br> + <sup>2</sup><?= l("Pour obtenir un compte Familine, vous devez envoyer une demande de création de compte ", "To get a Familine account, you need to send an account creation request ") ?><a href="https://familine.minteck.org"><?= l("depuis le site officiel de Familine", "from the official Familine website") ?></a>. </small> </div> </body> diff --git a/file/index.php b/file/index.php index d185834..02bb773 100644 --- a/file/index.php +++ b/file/index.php @@ -49,7 +49,7 @@ function fallback() {if (true): ?> <body> <div style="margin-top:50px;text-align:center;padding-bottom:50px;" class="container"> - <img src="/icns/64/application-x-core.svg" width="64px"> + <img src="/icns/64/application-x-partial-download.svg" width="64px"> <h1><?= l("Fichier inconnu", "Unknown file") ?></h1> <p><?= l("Nous ne parvenons pas à trouver le fichier, il a peut-être été supprimé ou a expiré. Si vous avez entré le lien par vous même, vérifiez l'ortographe.", "We couldn't find this file, it may have expired or has been deleted. If you entered the link by yourself, please check for spelling mistakes.") ?></p> </div> |