Browse Source

first prototype of ldap qr code

master
i am da real crt yes 2 years ago
parent
commit
515310b3b9
  1. 12
      app/gswave/index.php

12
app/gswave/index.php

@ -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";

Loading…
Cancel
Save