22 include dirname(dirname(dirname(__DIR__))) .
'/mainfile.php';
27 $text = Request::getString(
'text',
'error');
36 $ec = Endroid\QrCode\QrCode::LEVEL_HIGH;
39 $ec = Endroid\QrCode\QrCode::LEVEL_QUARTILE;
42 $ec = Endroid\QrCode\QrCode::LEVEL_MEDIUM;
46 $ec = Endroid\QrCode\QrCode::LEVEL_LOW;
49 $qrCode->setErrorCorrection($ec);
60 }
catch (\Exception $e) {
61 $xoopsPreload->triggerEvent(
'core.exception', $e);
67 header(
"Cache-Control: public, max-age=" .
$expires);
68 header(
'Expires: ' . gmdate(
'D, d M Y H:i:s', time() +
$expires) .
' GMT');
83 $color = preg_replace(
'/[^a-fA-F0-9]+/',
'', $color);
84 $color = substr(
'000000'.$color, -6);
86 'r' => hexdec(substr($color, 0, 2)),
87 'g' => hexdec(substr($color, 2, 2)),
88 'b' => hexdec(substr($color, 4, 2)),
catch(\Exception $e) $mimetype