diff --git a/index.php b/index.php index 77246d7..1e17142 100644 --- a/index.php +++ b/index.php @@ -1655,6 +1655,7 @@ $page_permissions = [ 'logs' => 'users_view', 'cash_registers' => 'users_view', 'register_sessions' => 'pos_view', + 'licenses' => 'users_view', ]; if (isset($page_permissions[$page]) && !can($page_permissions[$page])) { @@ -2304,6 +2305,11 @@ switch ($page) { $data['cash_registers'] = db()->query("SELECT * FROM cash_registers WHERE status = 'active'")->fetchAll(); $data['users'] = db()->query("SELECT id, username FROM users ORDER BY username ASC")->fetchAll(); break; + case 'licenses': + $res = LicenseService::listLicenses(); + $data['licenses'] = $res['success'] ? $res['data'] : []; + $data['license_error'] = $res['success'] ? '' : ($res['error'] ?? 'Failed to fetch licenses.'); + break; default: $data['customers'] = db()->query("SELECT * FROM customers WHERE type = 'customer' ORDER BY id DESC LIMIT 5")->fetchAll(); // Dashboard stats @@ -2616,6 +2622,9 @@ $projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Accounting System'; = __('backups') ?> + + = $lang === 'ar' ? 'إدارة التراخيص' : 'Manage Licenses' ?> + @@ -7151,6 +7160,71 @@ $projectDescription = $_SERVER['PROJECT_DESCRIPTION'] ?? 'Accounting System'; + +
View and search license keys activated on your system
+| ID | +License Key | +Max | +Used | +Status | +Created At | +
|---|---|---|---|---|---|
| + + No license data found on the server. + | +|||||
| #= $l['id'] ?> | += htmlspecialchars($l['license_key']) ?> |
+ = (int)$l['max_activations'] ?> | += (int)$l['activations_count'] ?> | ++ + Active + + Inactive + + | += htmlspecialchars($l['created_at']) ?> | +