diff --git a/cp/app/Controllers/SupportController.php b/cp/app/Controllers/SupportController.php new file mode 100644 index 0000000..f8440e5 --- /dev/null +++ b/cp/app/Controllers/SupportController.php @@ -0,0 +1,33 @@ +container->get('db')); + $tickets = $ticketModel->getAllTickets(); + return view($response,'admin/support/view.twig', compact('tickets')); + } + + public function newticket(Request $request, Response $response) + { + return view($response,'admin/support/newticket.twig'); + } + + public function docs(Request $request, Response $response) + { + return view($response,'admin/support/docs.twig'); + } + + public function mediakit(Request $request, Response $response) + { + return view($response,'admin/support/mediakit.twig'); + } +} \ No newline at end of file diff --git a/cp/app/Models/Tickets.php b/cp/app/Models/Tickets.php new file mode 100644 index 0000000..f11a39a --- /dev/null +++ b/cp/app/Models/Tickets.php @@ -0,0 +1,40 @@ +db = $db; + } + + public function getAllTickets() + { + return $this->db->select('SELECT * FROM support_tickets'); + } + + public function getTicketsById($id) + { + return $this->db->select('SELECT * FROM support_tickets WHERE id = ?', [$id])->fetch(); + } + + public function createTickets($id, $user_id, $category_id, $subject, $message, $status, $priority, $reported_domain, $nature_of_abuse, $evidence, $relevant_urls, $date_of_incident, $date_created, $last_updated) + { + $id = $this->db->quote($id); $user_id = $this->db->quote($user_id); $category_id = $this->db->quote($category_id); $subject = $this->db->quote($subject); $message = $this->db->quote($message); $status = $this->db->quote($status); $priority = $this->db->quote($priority); $reported_domain = $this->db->quote($reported_domain); $nature_of_abuse = $this->db->quote($nature_of_abuse); $evidence = $this->db->quote($evidence); $relevant_urls = $this->db->quote($relevant_urls); $date_of_incident = $this->db->quote($date_of_incident); $date_created = $this->db->quote($date_created); $last_updated = $this->db->quote($last_updated); + + $this->db->insert('INSERT INTO support_tickets (id, user_id, category_id, subject, message, status, priority, reported_domain, nature_of_abuse, evidence, relevant_urls, date_of_incident, date_created, last_updated) VALUES ($id, $user_id, $category_id, $subject, $message, $status, $priority, $reported_domain, $nature_of_abuse, $evidence, $relevant_urls, $date_of_incident, $date_created, $last_updated)'); + + return $this->db->lastInsertId(); + } + + public function deleteTickets($id) + { + $this->db->delete('DELETE FROM support_tickets WHERE id = ?', [$id]); + return true; + } +} \ No newline at end of file diff --git a/cp/resources/views/admin/support/docs.twig b/cp/resources/views/admin/support/docs.twig new file mode 100644 index 0000000..b534426 --- /dev/null +++ b/cp/resources/views/admin/support/docs.twig @@ -0,0 +1,62 @@ +{% extends "layouts/app.twig" %} + +{% block title %}{{ __('Documentation') }}{% endblock %} + +{% block content %} +
{{ documentation_intro|default('Replace this section with a brief introduction about your documentation.') }}
+ +{{ getting_started_text|default('Provide users with the basics to get started with your TLD registry management system here.') }}
+ +{{ registration_process_text|default('Describe the process for domain registration in detail here.') }}
+ + + + +{{ media_kit_intro|default('Replace this section with an introduction about the media kit contents and its intended audience.') }}
+ +{{ logos_intro|default('Provide guidelines on how to use your registry logos correctly.') }}
+ +{{ branding_guidelines|default('Detail any color schemes, typography, or design patterns related to your TLD registry brand here.') }}
+ +{{ press_releases_text|default('List recent press releases or provide links to them for registrars and the media.') }}
+ + + + ++ | ID + + | +Subject | +Status | +Priority | ++ |
---|---|---|---|---|---|
+ | {{ ticket.subject }} | +{{ ticket.status }} | +{{ ticket.priority }} | ++ + + + + | +