Jacek Kowalski
2026-02-16 3a28356193fdcbec0a29783efc7797dc7175ec82
Add QR Code renderer
2 files modified
14 ■■■■■ changed files
composer.json 3 ●●●● patch | view | raw | blame | history
public.php 11 ●●●●● patch | view | raw | blame | history
composer.json
@@ -13,6 +13,7 @@
        "php": ">=8.1",
        "ext-json": "*",
        "ubnt/ucrm-plugin-sdk": "^0.9.0",
        "webit/w-firma-api": "^2.6.0"
        "webit/w-firma-api": "^2.6.0",
        "chillerlan/php-qrcode": "^5.0"
    }
}
public.php
@@ -2,6 +2,17 @@
require_once(__DIR__ . '/vendor/autoload.php');
try {
    if (isset($_GET['barcode'])) {
        header('Content-Type: image/svg+xml');
        echo (new \chillerlan\QRCode\QRCode(new \chillerlan\QRCode\QROptions([
            'outputBase64' => false,
            'addQuietzone' => false,
            'drawLightModules' => false,
            'connectPaths' => true,
        ])))->render($_GET['barcode']);
        die();
    }
    $helper = new \SIPL\UCRM\wFirma\UcrmHelper();
    $event = $helper->getCurrentEvent();