be9164850a
Preset system: qr_presets table (migration 005) plus a presets.php AJAX endpoint (list/save/delete, CSRF-protected, scoped to the logged-in user's own id - presets are personal, never shared across accounts). UI/JS lives in dist/js/qrcode-style-tools.js. Random style button: client-side only, fills foreground/background with a random hex color pair (playful randomize, no contrast/scannability guarantee). Qr scanner (scan_qrcode.php): camera or image upload, decoded entirely client-side via html5-qrcode (CDN, pinned to 2.3.8). PWA: manifest.json + service-worker.js, icons generated from the existing DynamicQRCode_Original.png glyph. The service worker only caches static assets (css/js/images) and deliberately never touches PHP pages, since those carry CSRF tokens and session-specific content that must never be cached. Fixes a gap found while testing: qrcode_options.php is only a shared partial for the static qr forms - the dynamic qr form (form_dynamic_add.php) has its own separate copy of the foreground/background/level/size/filename/format fields (pre-existing structure, not something introduced here). That meant frame_text and the new preset/random-style UI never showed up on the dynamic qr page. Added the same fields there too, verified with a dynamic qr plus frame text (150x180px, the expected +30px padding). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
37 lines
1.3 KiB
PHP
37 lines
1.3 KiB
PHP
<!-- Control Sidebar -->
|
|
<aside class="control-sidebar control-sidebar-dark">
|
|
<!-- Control sidebar content goes here -->
|
|
</aside>
|
|
<!-- /.control-sidebar -->
|
|
|
|
<!-- Main Footer -->
|
|
<footer class="main-footer text-sm">
|
|
<strong><a href="https://github.com/giandonatoinverso/PHP-Dynamic-Qr-code" target="_blank">PHP Qrcode Generator</a> by </strong> Giandonato Inverso
|
|
<div class="float-right d-none d-sm-inline-block">
|
|
<b>Version</b> 2.3.0
|
|
</div>
|
|
</footer>
|
|
</div>
|
|
<!-- ./wrapper -->
|
|
|
|
<!-- REQUIRED SCRIPTS -->
|
|
<!-- jQuery -->
|
|
<script src="plugins/jquery/jquery.min.js"></script>
|
|
<!-- Bootstrap -->
|
|
<script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
|
|
<!-- AdminLTE App -->
|
|
<script src="dist/js/adminlte.js"></script>
|
|
<!-- AdminLTE Custom-->
|
|
<script src="dist/js/custom.js?nocache=<?php print rand();?>"></script>
|
|
<!-- Color picker -->
|
|
<script src="plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js"></script>
|
|
<!-- date-range-picker -->
|
|
<script src="plugins/daterangepicker/daterangepicker.js"></script>
|
|
<!-- Overlay scrollbar -->
|
|
<script type="text/javascript" src="plugins/overlayScrollbars/js/OverlayScrollbars.js"></script>
|
|
<!-- PWA service worker -->
|
|
<script>
|
|
if ('serviceWorker' in navigator) {
|
|
navigator.serviceWorker.register('service-worker.js');
|
|
}
|
|
</script> |