dillard 6387d24846 Admin-scoped user accounts, secure qr code storage, PHP 8.4 upgrade
Admin-scoped users (answers: who can create a 'user' account, only super or
also an admin within their own scope?):
- New owner_admin_id column on users (migration 004). NULL means created by
  super (company-wide, previous behavior); otherwise scoped to that admin's
  own codes.
- Users::addUser/editUser/deleteUser now allow an 'admin' session, but force
  type='user' and owner_admin_id to their own id regardless of submitted
  input. user.php/users.php open up to admins with a restricted UI (no type
  picker, listing limited to their own created users).
- New qr_compute_scope_owner_id()/qr_apply_owner_scope()/qr_has_full_visibility()
  helpers in includes/security.php, replacing the ad-hoc type==='admin' checks
  in index.php, dynamic_qrcodes.php, static_qrcodes.php and bulk_action.php.
  A 'user' account created by an admin is now scoped to that admin's codes
  instead of seeing everything company-wide.

Qr code storage hardening: images were served as plain static files under the
document root with no auth check at all. Storage now lives outside the web
root; qrcode_image.php and qrcode_zip_download.php gate access with the same
permission model as the list pages, and the bulk zip download is bound to the
session that generated it.

PHP 8.4 + chillerlan/php-qrcode 6.0.1: bumped since this is a dockerized app,
so the PHP version shipped doesn't matter to end users. Note: the 6.0.1 tag
itself only requires PHP 8.2 - the earlier "needs 8.4" read was from an
unpinned clone of master, which has since moved past the tag. Fixed along the
way, surfaced by testing on 8.4:
- The hardcoded Imagick build (an old pinned master commit, workaround for
  3.7.0 being broken on PHP 8.3+) no longer compiles on 8.4. Imagick 3.8.1 is
  now a normal stable release, so the workaround is gone.
- config.php had display_errors=On + error_reporting(E_ALL), so PHP 8.4's new
  deprecation notices got dumped straight into the response before
  session_start() could run, breaking login outright. Also an info-disclosure
  risk on its own. Now logged instead of displayed.
- MysqliDb::insertMulti() had an implicit nullable parameter, now explicit.
- includes/auth_validate.php redirected unauthenticated requests but never
  called exit(), so the rest of the script kept running.
- Dockerfile.fpm was missing both git (needed to clone chillerlan/php-qrcode)
  and the imagick extension entirely.

Also removes the unused sample qr code images that shipped in the original
repo; storage now lives outside the document root so they were never going
to be served again.
2026-07-08 20:38:58 +02:00
2020-09-08 16:56:05 +02:00
2025-09-02 21:52:03 +02:00

PHP Dynamic Qr code is a script that allows the generation and saving of dynamic and static QR codes. It has a clean, responsive, and user-friendly design. It is based on AdminLte, the "Best open source admin dashboard & control panel theme. Built on top of Bootstrap" and Core PHP Admin Panel, a simple Admin Panel written in core PHP that contains an implementation of general features you might need in your website admin panel like: record management (CRUD), secure authentication, pagination, filters.

LIVE DEMO

username: admin

password: admin

DOCUMENTATION

Features

  • #1 Dynamic Qr code generator on GitHub with a database to store Qr codes
  • Create unlimited Qr codes
  • Docker compose support
  • Control panel with 2 access levels
  • Multi-account
  • Dashboard with advanced statistics on Qr codes created and on scans
  • Bulk download, bulk delete
  • Dynamic Qr code
    • Create, modify, and delete Qr codes
    • You can download your Qr codes when you want
    • URL shortener with redirect
    • Enable or disable the link redirect
  • Static Qr code
    • Text QR Code
    • Email QR Code
    • Phone QR Code
    • Sms QR Code
    • Whatsapp QR Code
    • Skype QR Code
    • Location QR Code
    • Vcard QR Code
    • Event/calendar QR Code
    • Bookmark QR Code
    • Wifi QR Code
    • Paypal QR Code
    • Bitcoin QR Code
  • Customization of Qr codes
    • 6 formats for images
    • Foreground color
    • Background color
    • 4 levels of precision
    • 10 sizes
  • Responsive bootstrap-based design
  • Easy to understand and expand code
  • Full OOP with classes and well-documented

What is included

  • PHP files
  • .sql file with sample data
  • JS files
  • CSS files
  • Docker compose file

Setup with docker compose

  1. download docker-compose.yml file
  2. Start docker stack
docker compose build --no-cache && docker compose up -d
  1. Open your browser at http://localhost:80 and login with (username: superadmin, password: superadmin)
S
Description
Self-hosted QR-generator (MIT fork), publieke OSS-variant voor qr.ensembia.com
Readme MIT 15 MiB
Languages
JavaScript 79.3%
PHP 12.3%
CSS 5.1%
HTML 3.2%
Dockerfile 0.1%