From 3de91148bc3b634feb6d4b882c743317c517b8b0 Mon Sep 17 00:00:00 2001 From: arf20 Date: Sat, 16 Mar 2024 17:15:11 +0100 Subject: Add client and admin panels --- README.md | 11 +++++-- admin.php | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ client.php | 54 ++++++++++++++++++++++++++++++++++ dbinit.sql | 9 ++++++ index.php | 6 ++-- style.css | 8 ++++-- 6 files changed, 178 insertions(+), 7 deletions(-) create mode 100644 admin.php create mode 100644 client.php diff --git a/README.md b/README.md index 556781f..c9e1106 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,11 @@ User types: Helpdesk: read, answer and close tickets Accountant: view invoices and change status Client: order services and open tickets +Service types: + premium, standard, free +Services: + VPS, VPN, webhost, bot host, game host, proxy, mirror, subdomain, storage, + nextcloud, jellyfin, email, matrix, xmpp, voip Report problems with CST or such as password changes to admin@arf20.com @@ -50,6 +55,8 @@ FILES: form to add, edit and delete user entries manageservices.php form to add, edit and delete service entries + manageorders.php + form to add, edit and delete order entries managetickets.php form to add, edit and delete ticket entries (assign, too, sends email to specific helpdesk person) manageinvoices.php @@ -64,9 +71,9 @@ SQL: Tables: users User logins id autoincrement, username, password (hash), email, email verification code, status { verified, unverified }, type { client, helpdesk, accountant, admin }, register date - services Available services and management notes etc + services Available services id autoincrement, name, type, billing, description - orders + orders List of user orders and management notes etc id autoincrement, service id, instance name, client id, order date, specific billing, comments tickets List of tickets id autoincrement, client id, title, body, status { open, closed, nofix }, asignee diff --git a/admin.php b/admin.php new file mode 100644 index 0000000..a5012b8 --- /dev/null +++ b/admin.php @@ -0,0 +1,97 @@ +fetch_all(MYSQLI_ASSOC); + +// Get services +$sql = "SELECT id, name, type, billing FROM services"; +$stmt = mysqli_prepare($link, $sql); +mysqli_stmt_execute($stmt); +$result = mysqli_stmt_get_result($stmt); +$services = $result->fetch_all(MYSQLI_ASSOC); + +?> + + + + + + + ARFNET CSTIMS + + +
+ ARFNET +
+
+
+
+
+

ARFNET Client Service Ticket and Invoice Management System

+

panel

+
+
+

Users

+ + + \n"; + } + ?> +
usertypestatus
".$user['username']."".$user['type']."".$user['status']."
+
+
+

Service offerings

+ + + \n"; + } + ?> +
nametypebilling
".$service['name']."".$service['type']."".$service['billing']."€/mo
+
+
+

Orders

+ +
+
+

Tickets

+ +
+
+

Invoices

+ +
+
+
+ +
+
+ + diff --git a/client.php b/client.php new file mode 100644 index 0000000..615aac3 --- /dev/null +++ b/client.php @@ -0,0 +1,54 @@ + + + + + + + + ARFNET CSTIMS + + +
+ ARFNET +
+
+
+
+
+

ARFNET Client Service Ticket and Invoice Management System

+

panel

+
+
+

Active services

+ +
+
+

Tickets

+ +
+
+
+ +
+
+ + diff --git a/dbinit.sql b/dbinit.sql index 5a989ab..d9220d1 100644 --- a/dbinit.sql +++ b/dbinit.sql @@ -11,3 +11,12 @@ CREATE TABLE `arfnet2`.`users` ( `regdate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , PRIMARY KEY (`id`) ); + +CREATE TABLE `arfnet2`.`services` ( + `id` INT NOT NULL AUTO_INCREMENT , + `name` VARCHAR(255) NOT NULL , + `type` ENUM('free','standard','premium') NOT NULL , + `billing` DECIMAL NOT NULL , + `description` TEXT NOT NULL , + PRIMARY KEY (`id`) +); diff --git a/index.php b/index.php index d036d1b..db7b080 100644 --- a/index.php +++ b/index.php @@ -12,15 +12,15 @@
-
+

ARFNET Client Service Ticket and Invoice Management System

State of the art hosting solution with ultra personalised service

-
+

Our cutting edge datacenter


-
+

Services and plans

diff --git a/style.css b/style.css index a02aae1..7b0958b 100644 --- a/style.css +++ b/style.css @@ -22,12 +22,12 @@ body { font-size: 150%; } -.col { +.col5 { float: left; width: 50%; } -.col1 { +.col8 { float: left; width: 80%; } @@ -55,3 +55,7 @@ body { margin-top: 200px; } +table, th, td { + border: 1px solid black; +} + -- cgit v1.2.3