diff --git a/cp/app/Controllers/SystemController.php b/cp/app/Controllers/SystemController.php index 1f6a50f..de4d8e0 100644 --- a/cp/app/Controllers/SystemController.php +++ b/cp/app/Controllers/SystemController.php @@ -2,15 +2,31 @@ namespace App\Controllers; -use App\Models\Tickets; use Psr\Http\Message\ResponseInterface as Response; use Psr\Http\Message\ServerRequestInterface as Request; use Psr\Container\ContainerInterface; class SystemController extends Controller { - public function settings(Request $request, Response $response) + public function registry(Request $request, Response $response) { - return view($response,'admin/system/settings.twig'); - } + if ($_SESSION["auth_roles"] != 0) { + return $response->withHeader('Location', '/dashboard')->withStatus(302); + } + + $db = $this->container->get('db'); + $tlds = $db->select("SELECT id, tld, idn_table, secure FROM domain_tld"); + + foreach ($tlds as $key => $tld) { + // Count the domains for each TLD + $domainCount = $db->select("SELECT COUNT(name) FROM domain WHERE tldid = ?", [$tld['id']]); + + // Add the domain count to the TLD array + $tlds[$key]['domain_count'] = $domainCount[0]['COUNT(name)']; + } + + return view($response,'admin/system/registry.twig', [ + 'tlds' => $tlds, + ]); + } } \ No newline at end of file diff --git a/cp/resources/views/admin/system/registry.twig b/cp/resources/views/admin/system/registry.twig new file mode 100644 index 0000000..f6b547c --- /dev/null +++ b/cp/resources/views/admin/system/registry.twig @@ -0,0 +1,184 @@ +{% extends "layouts/app.twig" %} + +{% block title %}{{ __('Registry Configuration') }}{% endblock %} + +{% block content %} +
+ + + +
+
+
+
+
+ +
+
+
+
+
General Settings
+
+
+ +
+ + +
The official name of the organization operating the registry.
+
+ + +
+ + +
The email address for general inquiries to the registry.
+
+ + + +
+ +
+ +
+ + +
Choose the primary method of authentication for accessing the registry system.
+
+ + +
+ + +
A unique identifier for the registry which will be appended to each object handle.
+
+
+
+
+
+
+
TLD Settings
+ Add New TLD +
+ {% if tlds %} + {% for tld in tlds %} +
+
+
Number of Domains: {{ tld.domain_count }}
+
{{ tld.tld }}
+
    + {% if tld.secure == 1 %} +
  • + + Signed with DNSSEC +
  • + {% else %} +
  • + + Not signed with DNSSEC +
  • + {% endif %} +
  • + + Supports Standard Latin Characters Only +
  • +
+ +
+
+ {% endfor %} + {% endif %} +
+
+
DNS Settings
+
+ +
+ + +
The address of the primary DNS server for the registry.
+
+
+ + +
The address of the secondary DNS server for redundancy.
+
+ +
+ + +
The email address to be used in the SOA (Start of Authority) record for DNS zones.
+
+ + + +
+
+
+

Automation tab

+
Donec ac vitae diam amet vel leo egestas consequat rhoncus in luctus amet, facilisi sit mauris accumsan nibh habitant senectus
+
+
+
+
+
+
+
+
+ + +{% endblock %} \ No newline at end of file diff --git a/cp/resources/views/admin/system/settings.twig b/cp/resources/views/admin/system/settings.twig deleted file mode 100644 index 0bab262..0000000 --- a/cp/resources/views/admin/system/settings.twig +++ /dev/null @@ -1,402 +0,0 @@ -{% extends "layouts/app.twig" %} - -{% block title %}{{ __('System Configuration') }}{% endblock %} - -{% block content %} -
- - - -
-
-
-
- -
-
-
-
General Settings
-
- -
- - -
The official name of the organization operating the registry.
-
- - -
- - -
The primary language used in the registry system interfaces and communications.
-
- - -
- - -
The email address for general inquiries to the registry.
-
- - -
Operational Parameters
-
- - -
The standard length of time for domain registrations.
-
- - -
- - -
The base cost for registering a domain for the default period.
-
- - -
- - -
A unique identifier for the registry which will be appended to each object handle.
-
- - -
- -
Access the management interface for reserved domain names.
-
- - - -
-
-
-
Security Settings
-
- -
- - -
Select how you control access to the registry system. 'Whitelist' allows specific entities, while 'Blacklist' blocks them.
-
- - -
- - -
Define and manage user roles and permissions within the registry system.
-
- - -
- - -
Choose the primary method of authentication for accessing the registry system.
-
- - -
- - -
Determine the level of detail for system logs.
-
- - -
- - -
Select whether to encrypt data at rest, in transit, or both.
-
- - -
Additional Security Options
-
-
- - -
-
Toggle to enable or disable the firewall protection.
-
-
-
- - -
-
Activate measures to protect against Distributed Denial of Service attacks.
-
-
-
- - -
-
Implement rate limiting to prevent abuse of the registry system's interfaces.
-
- - - -
-
-
-

WHOIS tab

-
Would allow configuration of WHOIS server settings, privacy options, data display preferences, query rate limits, and other WHOIS-specific settings.
-
-
-

EPP tab

-
For configuring EPP server details, including command settings, extension support, and client management options.
-
-
-

RDAP tab

-
Could be used to manage RDAP service parameters, output format settings, bootstrap configurations, and search capabilities.
-
-
-
DNS Settings
-
- -
- - -
The address of the primary DNS server for the registry.
-
-
- - -
The address of the secondary DNS server for redundancy.
-
- - -
- - -
How often the DNS zone files should be generated.
-
- - -
- - -
Enable or disable DNS Security Extensions (DNSSEC) for the registry.
-
- - -
- - -
The minimum number of nameservers required for domain registration.
-
- - -
Additional DNS Options
-
-
- - -
Enable registry systems to support IPv6 addresses for nameservers.
-
-
-
-
- - -
Permit the use of wildcard DNS records within the domain zone files.
-
-
-
- - -
The email address to be used in the SOA (Start of Authority) record for DNS zones.
-
- - - -
-
-
-
Database Settings
-
- -
Connection Details
-
- - -
Hostname or IP address of the database server.
-
-
- - -
The name of the database used by the registry.
-
-
- - -
The username for accessing the database.
-
-
- - -
The password for the database user.
-
- - -
Backup Schedules
-
- - -
How often database backups should occur.
-
- - -
Maintenance Options
-
- - -
Scheduled time for routine database maintenance tasks.
-
- - -
Performance Tuning
-
- - -
The maximum number of concurrent database connections allowed.
-
-
- - -
The size of the query cache to improve read performance.
-
- - - -
-
-
-

Automation tab

-
Donec ac vitae diam amet vel leo egestas consequat rhoncus in luctus amet, facilisi sit mauris accumsan nibh habitant senectus
-
-
-
-
-
-
-
-
- - -{% endblock %} \ No newline at end of file diff --git a/cp/resources/views/layouts/app.twig b/cp/resources/views/layouts/app.twig index 1cb4bc3..3d75500 100644 --- a/cp/resources/views/layouts/app.twig +++ b/cp/resources/views/layouts/app.twig @@ -172,7 +172,7 @@ -
  • +
  • -
  • - - - - - {{ __('Reports') }} - - -
  • -
  • +
  • -
  • -
  • - -