Files
QRForge-selfhosted/src/static_qrcodes.php
T
dillard 23e8d9b765 Rebrand to QRForge (local only - do not push before domain confirmed)
Applies the approved QRForge brand kit throughout the app:
- New logo/icon SVGs, favicon set (ico/svg/png), apple-touch-icon, all
  copied from the approved brand kit into src/dist/img/brand/. Old
  Symbol_WhiteBlue.png/DynamicQRCode_Original.png removed (unused after
  the swap).
- Sidebar brand image/text, login and change-password page logos, all
  <title> tags, manifest.json name/theme-color, and the PWA icons
  (dist/img/icon-192.png/icon-512.png, same filenames so no other
  reference needed to change) updated to QRForge branding and the
  #2563EB brand blue.
- New about.php page (+ sidebar link): credits the original upstream
  fork (Giandonato Inverso) and chillerlan/php-qrcode, links to the free
  qr.ensembia.com try-out, the commercial www.qrforge.eu product page,
  and this GitHub repo for self-hosters.
- Footer now reads "QRForge" + "About / credits" + "Version 3.0"
  (replaces the inherited "PHP Qrcode Generator by Giandonato Inverso" /
  "Version 2.3.0" line - full credit moved to the About page instead).
- README.md rewritten: current feature set (all 16 static qr types,
  presets, scanner, PWA, location search, roles), qr.ensembia.com as the
  free try-out, www.qrforge.eu as the commercial product page, corrected
  Docker Compose setup steps (.env is required now, the old README still
  described the single-file demo setup from the original upstream fork).

IMPORTANT: not pushed to origin/gitea. Per user instruction, no push
until qrforge.eu domain registration is confirmed.
2026-07-11 02:48:05 +02:00

96 lines
3.0 KiB
PHP

<?php
require_once 'includes/bootstrap.php';
require_once BASE_PATH . '/includes/auth_validate.php';
require_once BASE_PATH . '/lib/StaticQrcode/StaticQrcode.php';
if ($_SESSION['type'] === 'user' && empty($_SESSION['can_view_static'] ?? null)) {
$_SESSION['failure'] = 'You are not allowed to view static qr codes.';
header('Location: index.php');
exit;
}
$db = getDbInstance();
$static_qrcode = new StaticQrcode();
$select = array('id', 'id_owner', 'filename', 'type', 'content', 'qrcode', 'created_at', 'updated_at');
$search_fields = array('filename', 'type', 'content');
require_once BASE_PATH . '/includes/search_order.php';
$page = filter_input(INPUT_GET, 'page', FILTER_SANITIZE_FULL_SPECIAL_CHARS) ?? 1;
$db->pageLimit = 15;
// Scoped to one admin's own codes for an admin (or a 'user' created by that admin);
// full visibility for super and company-wide 'user' accounts.
qr_apply_owner_scope($db);
$rows = $db->arraybuilder()->paginate('static_qrcodes', $page, $select);
$total_pages = $db->totalPages;
?>
<!DOCTYPE html>
<html lang="en">
<title>QRForge</title>
<head>
<?php include './includes/head.php'; ?>
</head>
<body class="hold-transition sidebar-mini layout-fixed layout-navbar-fixed layout-footer-fixed">
<div class="wrapper">
<!-- Navbar -->
<?php include './includes/navbar.php'; ?>
<!-- /.navbar -->
<!-- Main Sidebar Container -->
<?php include './includes/sidebar.php'; ?>
<!-- /.Main Sidebar Container -->
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header -->
<div class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1 class="m-0 text-dark">Static Qr codes</h1>
</div><!-- /.col -->
<?php if ($_SESSION['type'] !== 'user'): ?>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item">
<a href="static_qrcode.php" class="btn btn-success"><i class="fa fa-plus"></i> Add new</a>
</li>
</ol>
</div><!-- /.col -->
<?php endif; ?>
</div><!-- /.row -->
</div><!-- /.container-fluid -->
</div><!-- /.content-header -->
<!-- Flash message-->
<?php include BASE_PATH . '/includes/flash_messages.php'; ?>
<!-- /.Flash message-->
<!-- Filters -->
<?php $options = $static_qrcode->setOrderingValues();
include BASE_PATH . '/forms/filters.php'; ?>
<!-- /.Filters-->
<!-- Main content -->
<section class="content">
<div class="container-fluid">
<!-- Table -->
<?php include BASE_PATH . '/forms/table_static.php'; ?>
<!-- /.Table -->
</div><!-- /.container-fluid -->
</section>
</div><!-- /.content-wrapper -->
<!-- Footer and scripts -->
<?php include './includes/footer.php'; ?>
<!-- /.Footer and scripts -->
</body>
</html>