Refactor code structure for improved readability and maintainability
This commit is contained in:
14
lib/mpdf/qrcode/image.php
Normal file
14
lib/mpdf/qrcode/image.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
$msg = isset($_GET['msg']) ? $_GET['msg'] : '';
|
||||
if (!$msg) $msg = "Le site du spipu\r\nhttp://spipu.net/";
|
||||
|
||||
|
||||
$err = isset($_GET['err']) ? $_GET['err'] : '';
|
||||
if (!in_array($err, array('L', 'M', 'Q', 'H'))) $err = 'L';
|
||||
|
||||
require_once('qrcode.class.php');
|
||||
|
||||
$qrcode = new QRcode(utf8_encode($msg), $err);
|
||||
$qrcode->disableBorder();
|
||||
$qrcode->displayPNG(200);
|
||||
?>
|
||||
Reference in New Issue
Block a user