# WBMCZ — deploy notes · 06 Sep 2026 (sixth pass)
## Four user pages, a tile row that filters, and an export that follows it

No database change.

### New

    admin/users_user.php     every member account
    admin/users_admin.php    admin & super admin staff

### Changed

    includes/acl.php                    users.view_user, users.view_admin
    admin/includes/user_list_engine.php the audiences, the tiles, the export
    admin/includes/sidebar.php          User Management, and a Seller Management group

Upload `includes/` first, then `admin/`.

---

## 1 · USER MANAGEMENT — FOUR PAGES, BY KIND OF ACCOUNT

**User · Seller · Employees · Admin.** One page per kind of account, and that is
the whole split.

Free, Pro and Deleted are no longer pages of their own. They were never a
different *kind* of account — they are the same members in a different state,
which is a filter, not a page. They are tiles across the top of the User page
now, and clicking one filters the list you are already looking at.

The old files (`users_all.php`, `users_free.php`, `users_pro.php`,
`users_deleted.php`) still work and still carry their own permissions — they are
just off the menu, so old links and bookmarks keep working.

### Employees and Admin are now genuinely separate

Both are `user_type = 'admin'` in the table; what separates them is the level.
The page reads it the same way the Staff Accounts screen does: the level set on
the account, or the level on their role, or a role holding *all* — and the owner
account, which has no level and no role, counts as an admin. Otherwise a brand
new site would file its only account under Employees.

Checked against your data: **4 Employees + 1 Admin = 5 staff**, which is exactly
what Staff Accounts shows (1 Super Admin, 0 Admin, 4 Employee).

---

## 2 · THE TILE ROW

Nine numbers across the top, and **every one of them is a filter**:

    Total User · Free User · Subscription User · Pending KYC · KYC Request ·
    Complete KYC · No Referral · Referrers User · Delete User

Click *Subscription User* and the list below becomes the subscribed ones, with
the tile ringed so you can see what you are looking at. Click *Total* to come
back. Your search survives a tile click — a tile narrows what you are looking
at, it does not throw away what you typed.

The three KYC tiles say plainly what they count, because the words on their own
are ambiguous:

| Tile | Counts |
|---|---|
| **Pending KYC** | nothing submitted yet |
| **KYC Request** | sent in, waiting on us |
| **Complete KYC** | approved |

A fourth, **KYC Rejected**, appears only when there is something in it.

The numbers are counted over **this page's audience only** — the Sellers page
counts sellers — and *not* over the filters underneath, so the row does not
shuffle about while you work in it.

**Staff pages get different tiles**, because staff have no subscription, no KYC
and no referrals: Total · Active · Blocked · Joined this month · Deleted. Five
numbers that mean something beats nine, four of them permanently zero.

---

## 3 · SELLER MANAGEMENT

Its own heading, because sellers are the only accounts that hold company money.

* **Sellers** — the seller list, with the same nine tiles
* **Seller Profiles** — the existing `sellers.php` screen (it was a loose link
  under "More"; it belongs here)
* **Seller Collection** — the collections screen

And across the top of the Sellers page, three more tiles that lead to where the
money is actually dealt with:

| Tile | Shows | Goes to |
|---|---|---|
| **Seller Collection** | ₹ taken from customers and verified | the collections screen |
| **Verify Collection** | how many are said to be taken but not checked | the Verify Collection desk |
| **Seller Dues** | ₹ verified but not yet handed over | the Seller Dues desk |

The desks stay where they are on the Activity & Task board — that is where the
work is assigned. These are the way in from the seller you are looking at.

---

## 4 · EXPORT NOW FOLLOWS WHAT YOU SEE

**Nothing ticked** → exports every row the current filters allow: the audience,
the search, the tile, and every filter in the panel. Filter to *Subscription
User in West Bengal* and that is what lands in the file.

**Rows ticked** → exports exactly those rows. A new **Export N selected** button
appears in the blue bar the moment you tick something, next to the bulk actions.

The button under the filters now says which it will do, so there is no guessing
before you click.

Capped at 5,000 ticked rows and 10,000 rows overall per file.

---

## 5 · NEW PERMISSION KEYS

    users.view_user     See the Users list
    users.view_admin    See the Admins list

alongside the existing `view_free`, `view_pro`, `view_seller`, `view_employee`,
`view_deleted`. Anyone holding the broad `users.view` still opens all four
pages — the narrow keys only make it possible to give **less**.

---

## 6 · CHECKED

* every changed and new file passes `php -l`
* 68 admin pages load with no fatal, no warning and no notice
* the four audiences were counted straight from the database, and
  employees + admins add up to all staff
* both new permission keys are in the registry

**Needs your eyes**, because it is behind the sign-in: click through the tiles on
User and on Seller, then try Export both ways — with nothing ticked, and with a
few rows ticked.

One thing to expect: on your data the User page reads **Pending KYC 417** —
almost nobody has submitted anything yet. That is the real figure, not a fault.
