Merge branch 'master' of https://code.antopie.org/miraty/qr
This commit is contained in:
commit
037250e372
@ -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
|
||||
|
||||
|
18
index.php
18
index.php
@ -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']));
|
||||
|
10
style.less
10
style.less
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user