This commit is contained in:
Miraty 2020-03-06 21:44:36 +01:00
commit 037250e372
4 changed files with 29 additions and 3 deletions

View File

@ -4,7 +4,7 @@
deleteOldQR(60 * 60 * 24 * 7); // Temps en secondes après lequel le code QR sera supprimé lors du chargement d'un page
$theme = "parinux"; // dark, light ou parinux
$theme = "dark"; // dark, light ou parinux
$fileNameLenght = 32; // Longueur du nom du fichier du code QR

View File

@ -264,8 +264,24 @@ if (badQuery()) {
if (!empty($_GET['txt']) AND !empty($_GET['size']) AND !empty($_GET['redondancy']) AND !empty($_GET['margin']) AND !empty($_GET['bgColor']) AND !empty($_GET['mainColor'])) {
if (isset($_GET['txt']) AND isset($_GET['size']) AND isset($_GET['redondancy']) AND isset($_GET['margin']) AND isset($_GET['bgColor']) AND isset($_GET['mainColor'])) {
require "phpqrcode.php";
require "phpqrcode.php"; ?>
<div class="param">
<label for="margin">Taille de la marge</label>
<span class="conteneurAide">
<span class="boutonAide" tabindex="0"><?php include "aide.svg"; ?></span>
<span class="contenuAide">Nombre de pixels des bandes blanches autour du code QR.</span>
</span>
<br>
<select id="margin" name="margin">
<option <?php if (isset($_GET['margin']) AND ($_GET['margin'] == "0")) {echo 'selected="" ';} ?>value="0">0</option>
<option <?php if (isset($_GET['margin']) AND ($_GET['margin'] == "1")) {echo 'selected="" ';} ?>value="1">1</option>
<option <?php if ((isset($_GET['margin']) AND ($_GET['margin'] == "2")) OR (!isset($_GET['margin']) OR empty($_GET['margin']))) {echo 'selected="" ';} ?>value="2">2 - par défaut</option>
<option <?php if (isset($_GET['margin']) AND ($_GET['margin'] == "3")) {echo 'selected="" ';} ?>value="3">3</option>
<option <?php if (isset($_GET['margin']) AND ($_GET['margin'] == "5")) {echo 'selected="" ';} ?>value="5">5</option>
<option <?php if (isset($_GET['margin']) AND ($_GET['margin'] == "10")) {echo 'selected="" ';} ?>value="10">10</option>
</select>
</div>
$cheminImage = "temp/" . generateRandomString($fileNameLenght) . ".png";
QRcode::png($_GET['txt'], $cheminImage, $_GET['redondancy'], $_GET['size'], $_GET['margin'], false, hexdec($_GET['bgColor']), hexdec($_GET['mainColor']));

View File

@ -130,6 +130,16 @@ h2 {
margin-top: 30px;
}
h1 {
padding: auto;
margin-left: 10px;
}
#titre {
text-align: center;
justify-content: center;
}
.param {
padding: 10px;
padding-left: 0px;