first prototype of ldap qr code

This commit is contained in:
i am da real crt yes 2022-09-07 10:23:23 +02:00
parent 76c1b5c549
commit 515310b3b9
1 changed files with 12 additions and 0 deletions

View File

@ -186,6 +186,15 @@
$img->draw();
$image = $img->getImage();
$img->finish();
$ldapcode = new QRCode (- 1, QRErrorCorrectLevel::H);
$ldapcode->addData($ldapxml);
$ldapcode->make();
$ldapimg = new QRCodeImage ($ldapcode, $width=420, $height=420, $quality=50);
$ldapimg->draw();
$ldapimage = $ldapimg->getImage();
$ldapimg->finish();
}
catch (Exception $error) {
echo $error;
@ -195,6 +204,9 @@
//html image
if (is_uuid($extension_uuid)) {
echo "<img src=\"data:image/jpeg;base64,".base64_encode($image)."\" style='margin-top: 30px; padding: 5px; background: white; max-width: 100%;'>\n";
echo "<p>Extension QR Code</p>\n";
echo "<img src=\"data:image/jpeg;base64,".base64_encode($ldapimage)."\" style='margin-top: 30px; padding: 5px; background: white; max-width: 100%;'>\n";
echo "<p>LDAP QR Code</p>\n";
}
echo "</div>\n";