LibreQR is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
LibreQR est un logiciel libre ; vous pouvez le diffuser et le modifier suivant les termes de la GNU Affero General Public License telle que publiée par la Free Software Foundation ; soit la version 3 de cette licence, soit (à votre convenance) une version ultérieure.
if (!isset($params['redondancy']) OR !is_string($params['redondancy']) OR ($params['redondancy'] != "L" AND $params['redondancy'] != "M" AND $params['redondancy'] != "Q" AND $params['redondancy'] != "H"))
$params['redondancy'] = "H";
if ($_POST['redondancy'] === "L" OR $_POST['redondancy'] === "M" OR $_POST['redondancy'] === "Q" OR $_POST['redondancy'] === "H")
$params['redondancy'] = $_POST['redondancy'];
else
exit("Wrong value for redondancy");
if (!isset($params['margin']) OR !is_numeric($params['margin']))
$params['margin'] = 2;
if (is_numeric($_POST['margin']) AND $_POST['margin'] >= 0 AND $_POST['margin'] <= 128)
$params['margin'] = $_POST['margin'];
else
exit("Wrong value for margin");
if (!isset($params['size']) OR !is_numeric($params['size']))
$params['size'] = 4;
if (is_numeric($_POST['size']) AND $_POST['size'] >= 1 AND $_POST['size'] <= 128)
$params['size'] = $_POST['size'];
else
exit("Wrong value for size");
if (!isset($params['bgColor']) OR !is_string($params['bgColor']))
$params['bgColor'] = "#FFFFFF";
if (preg_match("/^#[abcdefABCDEF0-9]{6}$/", $_POST['bgColor']))
$params['bgColor'] = $_POST['bgColor'];
else
exit("Wrong value for bgColor");
if (!isset($params['mainColor']) OR !is_string($params['mainColor']))
$params['mainColor'] = "#000000";
if (preg_match("/^#[abcdefABCDEF0-9]{6}$/", $_POST['mainColor']))
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'])) {
'metaText_legal' => "LibreQR " . $libreqrVersion . " is a free software whose <ahref='https://code.antopie.org/miraty/libreqr/'>source code</a> is available under the terms of the <abbrtitle='GNU Affero General Public License version 3 or any later version'><ahref='LICENSE.html'>AGPLv3</a>+</abbr>.",
'opensearch_description' => "Generate QR codes from your search or address bar",
'opensearch_actionName' => "Generate QR codes from your search or address bar",
'metaText_legal' => "LibreQR " . $libreqrVersion . " est un logiciel libre dont le <ahref='https://code.antopie.org/miraty/libreqr/'>code source</a> est disponible selon les termes de l'<abbrtitle='GNU Affero General Public License version 3 ou toute version ultérieure'><ahref='LICENSE.html'>AGPLv3</a>+</abbr>.",
'opensearch_description' => "Générez des codes QR depuis votre barre de recherche ou d'adresse",
'opensearch_actionName' => "Générez des codes QR depuis votre barre de recherche ou d'adresse",
'metaText_legal' => "LibreQR " . $libreqrVersion . " es un logicial liure que son <ahref='https://code.antopie.org/miraty/libreqr/'>còdi font</a> es disponible jols tèrmes de la licéncia <abbrtitle='GNU Affero General Public License version 3 or any later version'><ahref='LICENSE.html'>AGPLv3</a>+</abbr>.",
'opensearch_description' => "Generatz de còdis QR a partir de la barra de recèrca o d’adreça",
'opensearch_actionName' => "Generatz de còdis QR a partir de la barra de recèrca o d’adreça",