mirror of
https://github.com/getnamingo/registry.git
synced 2025-06-28 15:13:27 +02:00
UI improvements on system settings
This commit is contained in:
parent
c3427aaa9c
commit
f2edce8f8b
5 changed files with 219 additions and 442 deletions
|
@ -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,
|
||||
]);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue