diff --git a/cp/app/Controllers/ContactsController.php b/cp/app/Controllers/ContactsController.php new file mode 100644 index 0000000..162f2fd --- /dev/null +++ b/cp/app/Controllers/ContactsController.php @@ -0,0 +1,19 @@ +container->get('db')); + $users = $userModel->getAllUsers(); + return view($response,'admin/contacts/index.twig', compact('users')); + } + +} diff --git a/cp/app/Controllers/HostsController.php b/cp/app/Controllers/HostsController.php new file mode 100644 index 0000000..cacbec3 --- /dev/null +++ b/cp/app/Controllers/HostsController.php @@ -0,0 +1,19 @@ +container->get('db')); + $users = $userModel->getAllUsers(); + return view($response,'admin/hosts/index.twig', compact('users')); + } + +} diff --git a/cp/resources/views/admin/contacts/index.twig b/cp/resources/views/admin/contacts/index.twig new file mode 100644 index 0000000..ed41fef --- /dev/null +++ b/cp/resources/views/admin/contacts/index.twig @@ -0,0 +1,82 @@ +{% extends "layouts/app.twig" %} + +{% block title %}Contacts{% endblock %} + +{% block content %} +
+ + + +
+
+
+
+
+ + + + + + + + + + + + + + +
Actions
+
+
+
+
+
+
+ + +{% endblock %} \ No newline at end of file diff --git a/cp/resources/views/admin/hosts/index.twig b/cp/resources/views/admin/hosts/index.twig new file mode 100644 index 0000000..6da73d8 --- /dev/null +++ b/cp/resources/views/admin/hosts/index.twig @@ -0,0 +1,81 @@ +{% extends "layouts/app.twig" %} + +{% block title %}Hosts{% endblock %} + +{% block content %} +
+ + + +
+
+
+
+
+ + + + + + + + + + + + + +
Actions
+
+
+
+
+
+
+ + +{% endblock %} \ No newline at end of file diff --git a/cp/resources/views/layouts/app.twig b/cp/resources/views/layouts/app.twig index 07b691e..d2cf81e 100644 --- a/cp/resources/views/layouts/app.twig +++ b/cp/resources/views/layouts/app.twig @@ -171,6 +171,24 @@ +
  • + + + + + Contacts + + +
  • +
  • + + + + + Hosts + + +
  • @@ -287,8 +305,12 @@ {% include 'partials/js-dash.twig' %} {% elseif route_is('domains') %} {% include 'partials/js-domains.twig' %} +{% elseif route_is('contacts') %} + {% include 'partials/js-contacts.twig' %} +{% elseif route_is('hosts') %} + {% include 'partials/js-hosts.twig' %} {% else %} {% include 'partials/js.twig' %} {% endif %} - + \ No newline at end of file diff --git a/cp/resources/views/partials/js-contacts.twig b/cp/resources/views/partials/js-contacts.twig new file mode 100644 index 0000000..6ffe986 --- /dev/null +++ b/cp/resources/views/partials/js-contacts.twig @@ -0,0 +1,43 @@ + + + + + diff --git a/cp/resources/views/partials/js-hosts.twig b/cp/resources/views/partials/js-hosts.twig new file mode 100644 index 0000000..f900b0d --- /dev/null +++ b/cp/resources/views/partials/js-hosts.twig @@ -0,0 +1,43 @@ + + + + + diff --git a/cp/routes/web.php b/cp/routes/web.php index 8e206e7..6c36d0f 100644 --- a/cp/routes/web.php +++ b/cp/routes/web.php @@ -3,6 +3,8 @@ use App\Controllers\Auth\AuthController; use App\Controllers\Auth\PasswordController; use App\Controllers\HomeController; use App\Controllers\DomainsController; +use App\Controllers\ContactsController; +use App\Controllers\HostsController; use App\Controllers\ProfileController; use App\Middleware\AuthMiddleware; use App\Middleware\GuestMiddleware; @@ -33,6 +35,8 @@ $app->group('', function ($route) { $app->group('', function ($route) { $route->get('/dashboard', HomeController::class .':dashboard')->setName('home'); $route->get('/domains', DomainsController::class .':view')->setName('domains'); + $route->get('/contacts', ContactsController::class .':view')->setName('contacts'); + $route->get('/hosts', HostsController::class .':view')->setName('hosts'); $route->get('/profile', ProfileController::class .':profile')->setName('profile'); $route->get('/profile/notifications', ProfileController::class .':notifications')->setName('notifications'); $route->get('/profile/security', ProfileController::class .':security')->setName('security'); @@ -71,4 +75,4 @@ $app->add(function (Psr\Http\Message\ServerRequestInterface $request, Psr\Http\S } }); -$app->addErrorMiddleware(true, true, true); +$app->addErrorMiddleware(true, true, true); \ No newline at end of file