7D Project Hub — EDL E-Bill Project
Version: 1.0.23
Build date: 2026-08-25
New since 1.0.22:
 - EDL POSTER LOGIN THEME (the default): the official EDL E-Bill
   poster artwork — the technician with his phone, the bill window,
   power poles and the four feature callouts — extracted at high
   resolution and blended seamlessly into a matching sky gradient,
   with drifting clouds and floating light particles layered on top,
   plus a dimmed night version in dark theme. (assets/img/login-edl.png)
 - E-BILLING LOGIN THEME: a second animated sign-in
   scene made for the E-Bill project — a floating smartphone showing
   the E-Bill app (bill lines, QR code with a scanning beam, ₭ total,
   PAY button and a pulsing "paid ✓" stamp), drifting paid receipts
   with ₭ amounts, floating ₭ coins and light particles, with its own
   night version in dark theme. Choose between the three scenes (or
   turn them off) in Settings → Branding → "Animated login scene";
   the power-grid scene from 1.0.22 remains available.
 - READABLE TEXT ON ANY SCENE: the company/copyright text under the
   login card now adapts to the theme — dark navy with a soft light
   glow on the bright scene, light with a dark shadow at night — so
   it stays clearly readable on every background.
   No database changes in this release.
New since 1.0.21:
 - ANIMATED LOGIN SCENE: the sign-in page now has a living power-grid
   scene — drifting clouds, spinning wind turbines, transmission
   pylons with electricity pulsing along the line, floating light
   particles, and a night version (stars + moon) in dark theme.
   Pure inline SVG + CSS, nothing loads from outside, disabled
   automatically for users with "reduce motion" set.
 - ASSET EXPORT → EDIT → RE-IMPORT (ຮັບເຂົ້າສາງ): a new "Export all"
   button downloads every asset as Excel/CSV in exactly the import
   layout. Edit in Excel, upload it back with the new "also update
   existing items" tick: existing codes are UPDATED (blank cell =
   keep current value, "-" = clear it), new codes are added, and MAC
   checks now correctly ignore the machine's own MAC. After import a
   result popup reports what was added / updated, and lists every
   skipped row with its line number and the reason. Without the tick
   the import behaves exactly as before (duplicates are skipped).
 - INSTALLER SELF-DELETE, 3 LAYERS: the "delete the install folder"
   button now works on every host — fix permissions then delete;
   if the host's file ownership prevents that, the folder is RENAMED
   to a random locked name (the /install/ URL dies instantly — as
   safe as deleting); and a denying .htaccess is written as a final
   net. The screen says plainly which method succeeded.
 - ORG CHART CENTERED: the on-screen chart now sits centred in the
   page instead of hugging the left edge.
   No database changes in this release.
New since 1.0.20:
 - ONE-CLICK SYSTEM UPDATE + ROLLBACK (upgrade_v35.sql): a new admin
   page — ລະບົບ → ອັບເດດລະບົບ (sysupdate.php). Upload the release ZIP,
   the system pre-checks it (genuine 7D package, newer version, disk
   space, folder writable — nothing is changed at this stage), then
   after re-entering your admin password it: turns on maintenance
   mode, snapshots EVERY program file plus a full database dump,
   installs the new files (config.php and uploads are never touched),
   runs all pending upgrade SQL automatically, verifies the version,
   and turns maintenance off — with a step-by-step log kept in the
   update history. If anything fails mid-way the files are restored
   from the snapshot AUTOMATICALLY. A rollback panel on the same page
   returns to any stored snapshot in one click: files-only
   (recommended — user data entered after the update is kept) or
   files + database (full restore, with a clear data-loss warning).
   Old snapshots can be deleted; a "force" tick allows re-installing
   the same version to repair damaged files.
 - COMPLETE LAO ADMIN GUIDE: ADMIN-GUIDE.md (shipped in this package,
   plus a formatted Word edition) — server requirements, step-by-step
   fresh install, HTTPS, the new update/rollback page, manual
   update/restore paths, backup strategy, security checklist and a
   troubleshooting table.
New since 1.0.19:
 - OPTIONAL PASSWORD ON QR INTAKE POINTS (upgrade_v34.sql): each
   province's QR can now require a password before the report form
   opens — set, change or remove it per province in Helpdesk →
   ຈຸດຮັບແຈ້ງ QR (blank keeps the current one, a tick removes it, and
   with none set scanning opens the form straight away exactly as
   before). Staff type the password once and their browser session
   remembers it; 8 wrong tries lock the attempt (HTTP 429). The
   password is bcrypt-hashed, protected provinces show a 🔒 badge in
   the admin list, and their printed A4 posters carry a 🔒 note
   telling staff to ask their branch supervisor for the password.
New since 1.0.18:
 - QR PROBLEM REPORTING PER PROVINCE (upgrade_v33.sql): every province
   gets its own link + QR code (18 Lao provinces pre-seeded, editable
   in the new Helpdesk → ຈຸດຮັບແຈ້ງ QR page). Print the ready-made A4
   poster, staff scan it and report a problem with no account — name,
   phone, employee ID, category, description and photos. The case
   lands in Helpdesk tagged with the province (badge + filter), gets
   a ticket like VTE-2026-0001 and the normal SLA clock. The reporter
   receives a private tracking link + QR showing a live status
   timeline (received → assigned → in progress → done), can rate the
   service 1–5 stars once the case closes, and can see their whole
   history by confirming any case number + their phone number.
   The executive dashboard gains a per-province table (open / closed /
   within-SLA / average rating). Public pages are protected with
   CSRF, a honeypot, per-session rate limits, reCAPTCHA when enabled,
   and secret 32-hex tokens that admins can revoke/reissue per
   province at any time.
New since 1.0.17:
 - INSTALLABLE APP (PWA): the site can now be installed to the home
   screen / desktop — Chrome and Edge show an "Install" button, and
   on a phone "Add to Home Screen" opens it full-screen like a native
   app, with its own 7D icon and your brand colour as the title-bar
   colour. What was added: a web-app manifest (manifest.php — picks
   up the app name and brand colour from Settings automatically), app
   icons (192/512 px + Apple touch icon), and a deliberately light
   service worker (sw.js) that only caches files under /assets/ —
   every page still loads live from the server, so nothing about
   log-in, CSRF, permissions or printing changes and there is NO
   offline mode. Note: browsers only offer the install prompt over
   HTTPS (or http://localhost), so enable HTTPS on your server to
   see it. No database changes.
New since 1.0.16:
 - RICH TEXT IN RECORDS: the ລາຍລະອຽດ / ເນື້ອໜັງສື field of ໃບສະເໜີ,
   ບັນທຶກກອງປະຊຸມ, ບັນທຶກການເຮັດວຽກ and ໃບມອບຮັບ now uses the full
   formatting toolbar (the same editor as ຂໍ້ມູນໂຄງການ): headings,
   fonts, sizes, bold/colours, alignment, line spacing, lists, tables,
   links and pictures — and the printed document shows exactly what
   you formatted. Existing plain-text records keep rendering exactly
   as before (the "-" bullet convention still works), and everything
   saved is sanitised server-side.
 - PASTE FROM WORD KEEPS THE LAYOUT: pasting from Word / Google Docs
   into any editor in the system now keeps the original look —
   indents, line spacing, bold/italic, alignment, font sizes, lists
   and tables — while Word's junk markup is stripped out. Hold Ctrl
   while pasting to insert plain text instead.
New since 1.0.15:
 - PASSWORD-PROTECTED SHARE LINKS (ຄັງໄຟລ໌, upgrade_v32.sql): when
   creating an external link you can now set an optional password —
   visitors see a lock screen and must type it before the file opens
   (bcrypt-hashed, remembered for their browser session, 8 wrong
   tries locks the attempt, opens are only counted after the correct
   password). Links with a password show a 🔒 badge in the share
   dialog; links without one behave exactly as before.
 - TABLER VISUAL REFRESH: the whole interface now follows the Tabler
   design language (tabler.io, MIT licence) — Tabler colour palette
   (primary #066fd1, success/warn/danger/info), flatter cards with
   subtle shadows, softer radii, Tabler-style table headers and stat
   labels (small uppercase, muted), refreshed dark theme, and the
   complete icon set swapped to Tabler Icons (41 icons, MIT). All of
   it is a token-level reskin of our own CSS: no page markup changed,
   no Bootstrap added, nothing loads from a CDN, printing and every
   automated check unaffected. The brand colour remains configurable
   in Settings → Branding (new default: Tabler blue).
New since 1.0.14:
 - TWO-FACTOR AUTHENTICATION (2FA): any user can turn it on from My
   Account — scan a QR with Google/Microsoft Authenticator, confirm
   one code, and every sign-in then asks for the 6-digit code after
   the password (±30s clock drift accepted, 5 wrong tries end the
   attempt). Admins see a 🔐 badge on the Users page and can clear a
   person's 2FA when a phone is lost. Recommended for admin/manager.
 - HELPDESK SLA & RATINGS: each urgency has a close-time limit
   (Settings → notifications: critical 4h · high 24h · normal 72h ·
   low 120h by default, 0 = off). Overdue open cases alert the
   assignee and managers once, the list shows ⏰ over / ⏳ near-SLA
   badges, and the dashboard adds %-closed-within-SLA, overdue-now,
   average close time and average rating. When a case closes, the
   reporter is invited to rate it 1–5 stars with a comment; the
   closer sees the score.
 - MONTHLY TARGETS FOR FORMS (E-Bill signups): set a per-month goal
   on each form's dashboard — progress bar for this month, %-of-goal
   badge, and a 6-month history with goal-hit months in green.
 - EXECUTIVE DASHBOARD (exec.php, admins + managers): the whole
   project on one page — overall progress, open/overdue helpdesk with
   SLA and rating, active users, documents/records this month, form
   signups vs target per form, and four 6-month trend charts. On the
   1st of every month the system automatically emails last month's
   summary to every admin and manager (an admin can also send it on
   demand from the page). (upgrade_v31.sql)
New since 1.0.13:
 - ONLYOFFICE INTEGRATION (edit documents in the browser): connect an
   OnlyOffice Document Server (Settings → ຄັງໄຟລ໌ → OnlyOffice: URL +
   JWT Secret; full install guide in OO-SETUP.md). Word / Excel /
   PowerPoint files in the file library then get a 📝 "Edit online"
   button (view-only shares open read-only). Every save from the
   editor comes back as a NEW VERSION — the old file is kept and can
   be restored, the activity log records who edited, and the owner is
   notified when someone else saves. All server calls are signed
   (JWT + expiring per-file tokens); with no server configured the
   buttons simply do not appear. Insert your signature/stamp image
   in the editor via Insert → Image.
New since 1.0.12:
 - ORG CHART PRINT DESIGNER (🎨 button on the chart page): a shared,
   per-team print template — big title + subtitle line (PRIME PULSE
   style), three card styles (detailed / compact name+position /
   big round photo), card-header and line colours, per-field show/hide
   (photo, position, department, email, phone, tasks) and text size
   90–125%. Every change previews live on the chart; Save stores it
   centrally so everyone prints the same official design (users with
   member-edit rights can save; Reset returns to defaults).
New since 1.0.11:
 - ORG-CHART SHARING & STEPPED APPROVALS (ຄັງໄຟລ໌, upgrade_v30.sql):
   a new switch in Settings → ຄັງໄຟລ໌ ("limit by the org chart").
   When on, internal sharing is limited to your direct manager, your
   direct reports and teammates under the same manager — no sharing
   across branches or over your boss's head. Approval requests can
   only go UP your reporting line and run in steps: your direct
   manager (step 1) must approve before step 2 is even notified;
   a rejection ends the round. Link accounts to the chart on the
   Users page (Members field) — unlinked users keep working as
   before, and admins are never limited.
New since 1.0.10:
 - ORG CHART: centred on screen by default (still scrolls left/right
   when wider than the window). Printing now prints ONLY the chart —
   no letterhead, no level-summary card — under an editable heading
   (default ຜັງອົງກອນ, type your own in the toolbar; remembered per
   team). A paper-size picker (A4 / A3 / A1 / A0 / Letter, landscape)
   scales the whole chart to fit that sheet on ONE page — rows never
   split across pages.
 - DOCUMENT NUMBER POSITION: the ເລກທີ / No. line can now be placed in
   any of five spots from Settings → Document layout (ຕຳແໜ່ງເລກທີ):
   left under the header, centred, right on the logo row, right under
   the header (with place/date), or right beside the document title.
   The live preview shows the result immediately.
 - SIGNATURE / STAMP IMAGE SIZE: two new controls per document type —
   image height in px (0 = automatic, follows the signature box) and
   maximum width in px. A larger image grows the signature box
   automatically; images always keep their proportions. Applies to the
   sign blocks on all document kinds, including the purchase form's
   signature table.
New since 1.0.9:
 - FOOTER: every page now ends with "© 2024–<current year> <company>.
   All rights reserved." and a version chip (e.g. Version 1.0.10) on the
   right; the login page shows the same line. The version comes from
   APP_VERSION in bootstrap.php, the © start year from APP_COPY_SINCE,
   and the end year follows the server clock automatically.
New since 1.0.8:
 - FILE LIBRARY v2 (ຄັງໄຟລ໌ຂອງຂ້ອຍ) — full file-manager redesign
   (upgrade_v29.sql):
   · Three-pane layout: sidebar (upload / new folder, sections with
     live counts, collapsible folder tree, storage bar), main area
     with breadcrumb, search, grid ⊞ / list ☰ views, and a details
     panel that opens when you click a file.
   · Sections: My files · Favourites ★ · My links 🔗 · Shared with me ·
     Recent · Approvals ✅ (with pending badge) · Trash 🗑.
   · Details panel: preview (image / PDF / text), size-owner-updated
     info, actions, old versions, comments, and — for the owner — a
     full activity history (who viewed / downloaded / edited, with IP).
   · FILE VERSIONS: uploading a new version keeps the old one; open or
     restore any previous version any time.
   · COMMENTS on shared files, with notifications to owner + sharees.
   · DOCUMENT APPROVAL: owner picks approvers → they approve / reject
     with a note from the Approvals tab → requester is notified; the
     file card shows the state (⏳ / ✅ / ❌); a new request starts a
     fresh round.
   · TRASH: deleting moves a file to the trash first (external links
     stop working immediately); restore it or delete permanently —
     purging also removes every stored version from disk.
   · Every action lands in a per-file log: view, download, upload,
     rename, new version, share/unshare, comment, approval steps,
     restore, trash, external-link opens.
New since 1.0.7:
 - FORM REPORT LETTERHEAD is now configurable per form (Report
   template tab): header left or fully centred, Lao/English name
   order, logo on/off + size, address, division line, extra line,
   national motto, document number and place, and four underline
   styles — just like the Document-layout screen. (upgrade_v28.sql)
 - CONSENT TERMS: the confirm checkbox on public forms can carry full
   terms & conditions — written (or left empty) in the form designer;
   respondents open a "Read the terms" box and can scroll the whole
   text before ticking. The E-Bill template ships with a sample.
 - The public form submit button now uses the web Lao font.
New since 1.0.6:
 - EDITABLE SYSTEM LANGUAGE (Settings → ແກ້ໄຂພາສາ): every word of the
   interface can be edited per language (blank = back to the original),
   with search across ~700 keys. New languages can be added (e.g. Thai,
   Vietnamese, Chinese) with a chosen base language — untranslated words
   fall back to the base, the new language appears in everyone's top-bar
   switch immediately, and it can be removed again. (upgrade_v27.sql)
 - USERS PAGE: modern ON/OFF pill toggles — enable/disable any account
   straight from the table (signs them out at once; self and the last
   admin are protected), and the add/edit dialog got a large ON/OFF
   account switch and a tidier layout.
 - FORMS LIST tidied: aligned icon-button toolbar per row, a clear
   green ເປີດຮັບ / amber ປິດຮັບ pill, and a neat public-link chip.
New since 1.0.5:
 - LUCKY-DRAW WHEEL upgraded: three draw modes (by weight / exact
   percent that should total 100 / equal chance), live percentage shown
   beside every prize while editing, and a daily win limit (once
   reached, only "no win" slots come up for the rest of the day).
   Public wheel page redesigned — festive lighted rim, polished hub,
   proper Lao web font on the spin button, more space under the wheel.
 - SIGNING FIX: a saved signature/stamp stored as JPG or WebP now
   really lands on the document — every signature is re-encoded to PNG
   on the server (this is why "saved, but nothing appeared" happened).
   The sign dialog's mode tabs were restyled as a clean segmented bar.
 - PRINT LETTERHEAD: every printed page now carries an official
   centred letterhead (logo + company lines) — editable in Settings →
   Branding, and the org chart is centred on the sheet when printed.
New since 1.0.4:
 - CONFIDENTIAL DOCUMENTS (ເອກະສານຊັ້ນຄວາມລັບ) in the in/out register:
   per-document confidential toggle, the creator names exactly who may
   view; everyone else sees only a masked row (subject, notes, files,
   search and CSV all hidden). Viewing needs a 6-digit PIN (shared with
   the signature vault, 3 wrong tries = 30-minute lock, ~10-minute
   unlock per session). Every view / download / wrong PIN / denied try
   and every grant/revoke is written to a detailed access log (with IP)
   that the creator can open, and the named people + creator are
   notified when the document is opened or a file is downloaded.
   (upgrade_v24.sql)
 - PERSONAL FILE LIBRARY (ຄັງໄຟລ໌ຂອງຂ້ອຍ): every user gets their own
   file area with folders, drag-and-drop upload, rename, new-version
   upload and delete. Files can be shared to named users (view or edit
   rights — edit allows rename + new version) with notifications, or
   through external links (optional expiry, view counter, revoke) that
   need no login. Admin settings tab sets the storage limit in GB per
   role or per person, and the allowed upload extensions.
   (upgrade_v25.sql)
 - BUILT-IN USER MANUAL (ຄູ່ມືການໃຊ້ງານ): book button in the top bar,
   role-aware — staff see the staff guide, managers also the manager
   guide, admins all three — with its own Lao/English switch and a
   printable layout.
 - Every user now has an English name too (full_name_en): shown when
   the interface is in English, editable on the profile and by admins.
 - Default colour mode really applies now: users who never chose a
   theme follow the system default (light / dark / auto) and see an
   admin's change immediately. (upgrade_v26.sql)
 - Footer can now carry a logo (.png auto-sized) alone or together
   with the footer text — Settings → Branding.
 - Org chart printing fixed: prints on one A3 landscape sheet, chart
   auto-scaled to fit, level summary moved to its own page.
From 1.0.21 onward you can upgrade from the web: ລະບົບ → ອັບເດດລະບົບ
(it runs the SQL below automatically). Manual path:
Upgrading from 1.0.21 or 1.0.22: nothing to run — no database changes
Upgrading from 1.0.20: run upgrade_v35.sql
Upgrading from 1.0.19: run upgrade_v34.sql then upgrade_v35.sql
Upgrading from 1.0.16–1.0.18: run upgrade_v33.sql … upgrade_v35.sql
Upgrading from 1.0.15: run upgrade_v32.sql … upgrade_v35.sql
Upgrading from 1.0.12–1.0.14: run upgrade_v31.sql … upgrade_v35.sql
Upgrading from 1.0.9–1.0.11: run upgrade_v30.sql … upgrade_v35.sql
Upgrading from 1.0.8: run upgrade_v29.sql … upgrade_v35.sql
Upgrading from 1.0.x: run upgrade_v19 … upgrade_v35 in order
Tested: 2484 automated checks passing (0 failing) on a clean install
Requires: PHP 8.0+ (tested on 8.4), MySQL/MariaDB 10.4+, Apache or Nginx
