From 114a72424ca805bb7b172acb95895ef701fd6bc1 Mon Sep 17 00:00:00 2001 From: Marcus Hill Date: Sun, 31 Dec 2023 10:34:01 +0000 Subject: [PATCH 01/10] Add domain_notes database field --- database_updates.php | 20 ++++++++++++++------ database_version.php | 2 +- db.sql | 1 + 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/database_updates.php b/database_updates.php index 66f9ef79..1ba8ada7 100644 --- a/database_updates.php +++ b/database_updates.php @@ -1418,7 +1418,7 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) { // // Then, update the database to the next sequential version mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.8.9'"); - } + } if (CURRENT_DATABASE_VERSION == '0.8.9') { @@ -1452,7 +1452,7 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) { mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Recurring', log_action = 'Modify', log_description = 'Updated item_order to item_id: $item_order'"); } } - + // // Then, update the database to the next sequential version @@ -1495,7 +1495,7 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) { if (CURRENT_DATABASE_VERSION == '0.9.4') { // Insert queries here required to update to DB version 0.9.5 - mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_stripe_client_pays_fees` TINYINT(1) NOT NULL DEFAULT 0 AFTER `config_stripe_account`"); + mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_stripe_client_pays_fees` TINYINT(1) NOT NULL DEFAULT 0 AFTER `config_stripe_account`"); // Then, update the database to the next sequential version mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.9.5'"); } @@ -1524,14 +1524,22 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) { mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.9.8'"); } + if (CURRENT_DATABASE_VERSION == '0.9.8') { + //Insert queries here required to update to DB version 0.9.9 + mysqli_query($mysqli, "ALTER TABLE `domains` ADD `domain_notes` TEXT NULL DEFAULT NULL AFTER `domain_raw_whois`"); + + //Then, update the database to the next sequential version + mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.9.9'"); + } + // Be sure to change database_version.php to reflect the version you are updating to here // Please add this same comment block to the bottom of this file, and update the version number. // Uncomment Below Lines, to add additional database updates // - // if (CURRENT_DATABASE_VERSION == '0.9.8') { - // // Insert queries here required to update to DB version 0.9.9 + // if (CURRENT_DATABASE_VERSION == '0.9.9') { + // // Insert queries here required to update to DB version 0.10.0 // // Then, update the database to the next sequential version - // mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.9.9'"); + // mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.10.0'"); // } } else { diff --git a/database_version.php b/database_version.php index 55f0278b..0e02bd3d 100644 --- a/database_version.php +++ b/database_version.php @@ -5,5 +5,5 @@ * It is used in conjunction with database_updates.php */ -DEFINE("LATEST_DATABASE_VERSION", "0.9.8"); +DEFINE("LATEST_DATABASE_VERSION", "0.9.9"); diff --git a/db.sql b/db.sql index b7590423..3f8f6da8 100644 --- a/db.sql +++ b/db.sql @@ -505,6 +505,7 @@ CREATE TABLE `domains` ( `domain_mail_servers` varchar(255) DEFAULT NULL, `domain_txt` text DEFAULT NULL, `domain_raw_whois` text DEFAULT NULL, + `domain_notes` text DEFAULT NULL, `domain_created_at` datetime NOT NULL DEFAULT current_timestamp(), `domain_updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(), `domain_archived_at` datetime DEFAULT NULL, From 1a1b4ee8108162873c8d3f6497ffc2beffed321e Mon Sep 17 00:00:00 2001 From: Marcus Hill Date: Sun, 31 Dec 2023 11:13:24 +0000 Subject: [PATCH 02/10] Add notes to networks; move networks js to its own file --- client_network_add_modal.php | 23 +++++++++------- client_network_edit_modal.php | 15 +++++++---- client_networks.php | 51 ++--------------------------------- js/network_edit_modal.js | 47 ++++++++++++++++++++++++++++++++ post/network.php | 6 +++-- 5 files changed, 77 insertions(+), 65 deletions(-) create mode 100644 js/network_edit_modal.js diff --git a/client_network_add_modal.php b/client_network_add_modal.php index 2d9f5cbf..ac14fa46 100644 --- a/client_network_add_modal.php +++ b/client_network_add_modal.php @@ -9,8 +9,8 @@
- +
+ + +
+
@@ -69,15 +74,15 @@
- - +
@@ -162,54 +162,7 @@ require_once "client_network_export_modal.php"; ?> - + = 0; i--) { + locationDropdown.remove(i); + } + locationDropdown[locationDropdown.length] = new Option('- Location -', '0'); + + // Populate location dropdown + locations.forEach(location => { + if (parseInt(location.location_id) == parseInt(network.network_location_id)) { + locationDropdown[locationDropdown.length] = new Option(location.location_name, location.location_id, true, true); + } + else{ + locationDropdown[locationDropdown.length] = new Option(location.location_name, location.location_id); + } + }); + } + ); +} diff --git a/post/network.php b/post/network.php index 80729a09..a6cc0d50 100644 --- a/post/network.php +++ b/post/network.php @@ -14,9 +14,10 @@ if (isset($_POST['add_network'])) { $network = sanitizeInput($_POST['network']); $gateway = sanitizeInput($_POST['gateway']); $dhcp_range = sanitizeInput($_POST['dhcp_range']); + $notes = sanitizeInput($_POST['notes']); $location_id = intval($_POST['location']); - mysqli_query($mysqli,"INSERT INTO networks SET network_name = '$name', network_vlan = $vlan, network = '$network', network_gateway = '$gateway', network_dhcp_range = '$dhcp_range', network_location_id = $location_id, network_client_id = $client_id"); + mysqli_query($mysqli,"INSERT INTO networks SET network_name = '$name', network_vlan = $vlan, network = '$network', network_gateway = '$gateway', network_dhcp_range = '$dhcp_range', network_notes = '$notes', network_location_id = $location_id, network_client_id = $client_id"); $network_id = mysqli_insert_id($mysqli); @@ -39,10 +40,11 @@ if (isset($_POST['edit_network'])) { $network = sanitizeInput($_POST['network']); $gateway = sanitizeInput($_POST['gateway']); $dhcp_range = sanitizeInput($_POST['dhcp_range']); + $notes = sanitizeInput($_POST['notes']); $location_id = intval($_POST['location']); $client_id = intval($_POST['client_id']); - mysqli_query($mysqli,"UPDATE networks SET network_name = '$name', network_vlan = $vlan, network = '$network', network_gateway = '$gateway', network_dhcp_range = '$dhcp_range', network_location_id = $location_id WHERE network_id = $network_id"); + mysqli_query($mysqli,"UPDATE networks SET network_name = '$name', network_vlan = $vlan, network = '$network', network_gateway = '$gateway', network_dhcp_range = '$dhcp_range', network_notes = '$notes', network_location_id = $location_id WHERE network_id = $network_id"); //Logging mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Network', log_action = 'Modify', log_description = '$session_name modified network $name', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_client_id = $client_id, log_user_id = $session_user_id, log_entity_id = $network_id"); From d3b59edfe4fde3c8f381fa086e713de638ca9051 Mon Sep 17 00:00:00 2001 From: Marcus Hill Date: Sun, 31 Dec 2023 11:13:48 +0000 Subject: [PATCH 03/10] Add notes to domains --- client_domain_add_modal.php | 6 ++++++ client_domain_edit_modal.php | 21 +++++++++++++-------- js/domain_edit_modal.js | 17 +++++++++-------- post/domain.php | 7 +++++-- 4 files changed, 33 insertions(+), 18 deletions(-) diff --git a/client_domain_add_modal.php b/client_domain_add_modal.php index ab69e055..41caf7e4 100644 --- a/client_domain_add_modal.php +++ b/client_domain_add_modal.php @@ -73,7 +73,13 @@
+
+ + +
+ + @@ -65,10 +65,15 @@
- + +
+ + +
+
@@ -89,7 +94,7 @@
- +
@@ -99,7 +104,7 @@
- + @@ -109,7 +114,7 @@
- + @@ -119,7 +124,7 @@
- + diff --git a/js/domain_edit_modal.js b/js/domain_edit_modal.js index 41977a03..c045869c 100644 --- a/js/domain_edit_modal.js +++ b/js/domain_edit_modal.js @@ -14,20 +14,21 @@ function populateDomainEditModal(client_id, domain_id) { const vendors = response.vendors; // Populate the domain modal fields - document.getElementById("editHeader").innerText = domain.domain_name; + document.getElementById("editDomainHeader").innerText = domain.domain_name; document.getElementById("editDomainId").value = domain_id; document.getElementById("editDomainName").value = domain.domain_name; - document.getElementById("editExpire").value = domain.domain_expire; + document.getElementById("editDomainExpire").value = domain.domain_expire; + document.getElementById("editDomainNotes").value = domain.domain_notes; document.getElementById("editDomainIP").value = domain.domain_ip; - document.getElementById("editNameServers").value = domain.domain_name_servers; - document.getElementById("editMailServers").value = domain.domain_mail_servers; - document.getElementById("editTxtRecords").value = domain.domain_txt; - document.getElementById("editRawWhois").value = domain.domain_raw_whois; + document.getElementById("editDomainNameServers").value = domain.domain_name_servers; + document.getElementById("editDomainMailServers").value = domain.domain_mail_servers; + document.getElementById("editDomainTxtRecords").value = domain.domain_txt; + document.getElementById("editDomainRawWhois").value = domain.domain_raw_whois; /* DROPDOWNS */ // Registrar dropdown - var registrarDropdown = document.getElementById("editRegistrarId"); + var registrarDropdown = document.getElementById("editDomainRegistrarId"); // Clear registrar dropdown var i, L = registrarDropdown.options.length -1; @@ -48,7 +49,7 @@ function populateDomainEditModal(client_id, domain_id) { }); // Webhost dropdown - var webhostDropdown = document.getElementById("editWebhostId"); + var webhostDropdown = document.getElementById("editDomainWebhostId"); // Clear registrar dropdown var i, L = webhostDropdown.options.length -1; diff --git a/post/domain.php b/post/domain.php index 6fcd249a..41cf1a92 100644 --- a/post/domain.php +++ b/post/domain.php @@ -14,6 +14,8 @@ if (isset($_POST['add_domain'])) { $webhost = intval($_POST['webhost']); $extended_log_description = ''; $expire = sanitizeInput($_POST['expire']); + $notes = sanitizeInput($_POST['notes']); + if (empty($expire)) { $expire = "NULL"; } else { @@ -35,7 +37,7 @@ if (isset($_POST['add_domain'])) { $whois = sanitizeInput($records['whois']); // Add domain record - mysqli_query($mysqli,"INSERT INTO domains SET domain_name = '$name', domain_registrar = $registrar, domain_webhost = $webhost, domain_expire = $expire, domain_ip = '$a', domain_name_servers = '$ns', domain_mail_servers = '$mx', domain_txt = '$txt', domain_raw_whois = '$whois', domain_client_id = $client_id"); + mysqli_query($mysqli,"INSERT INTO domains SET domain_name = '$name', domain_registrar = $registrar, domain_webhost = $webhost, domain_expire = $expire, domain_ip = '$a', domain_name_servers = '$ns', domain_mail_servers = '$mx', domain_txt = '$txt', domain_raw_whois = '$whois', domain_notes = '$notes', domain_client_id = $client_id"); // Get inserted ID (for linking certificate, if exists) @@ -70,6 +72,7 @@ if (isset($_POST['edit_domain'])) { $registrar = intval($_POST['registrar']); $webhost = intval($_POST['webhost']); $expire = sanitizeInput($_POST['expire']); + $notes = sanitizeInput($_POST['notes']); if (empty($expire) || (new DateTime($expire)) < (new DateTime())) { // Update domain expiry date @@ -86,7 +89,7 @@ if (isset($_POST['edit_domain'])) { $txt = sanitizeInput($records['txt']); $whois = sanitizeInput($records['whois']); - mysqli_query($mysqli,"UPDATE domains SET domain_name = '$name', domain_registrar = $registrar, domain_webhost = $webhost, domain_expire = '$expire', domain_ip = '$a', domain_name_servers = '$ns', domain_mail_servers = '$mx', domain_txt = '$txt', domain_raw_whois = '$whois' WHERE domain_id = $domain_id"); + mysqli_query($mysqli,"UPDATE domains SET domain_name = '$name', domain_registrar = $registrar, domain_webhost = $webhost, domain_expire = '$expire', domain_ip = '$a', domain_name_servers = '$ns', domain_mail_servers = '$mx', domain_txt = '$txt', domain_raw_whois = '$whois', domain_notes = '$notes' WHERE domain_id = $domain_id"); //Logging mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Domain', log_action = 'Modify', log_description = '$session_name modified domain $name', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_client_id = $client_id, log_user_id = $session_user_id, log_entity_id = $domain_id"); From 86b31ada1f905338609f16998d68ee7aaa0158fe Mon Sep 17 00:00:00 2001 From: Marcus Hill Date: Sun, 31 Dec 2023 11:13:57 +0000 Subject: [PATCH 04/10] Add notes to certs --- client_certificate_add_modal.php | 7 ++++++- client_certificate_edit_modal.php | 9 ++++++++- js/certificate_edit_modal.js | 1 + post/certificate.php | 6 ++++-- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/client_certificate_add_modal.php b/client_certificate_add_modal.php index 228f154a..99def7f7 100644 --- a/client_certificate_add_modal.php +++ b/client_certificate_add_modal.php @@ -64,6 +64,11 @@ +
+ + +
+
@@ -92,4 +97,4 @@
- \ No newline at end of file + diff --git a/client_certificate_edit_modal.php b/client_certificate_edit_modal.php index 31c5fd9c..f3bc8638 100644 --- a/client_certificate_edit_modal.php +++ b/client_certificate_edit_modal.php @@ -65,6 +65,11 @@ +
+ + +
+
@@ -75,7 +80,9 @@
+ + - \ No newline at end of file + diff --git a/js/certificate_edit_modal.js b/js/certificate_edit_modal.js index 77e891cc..2beb1bee 100644 --- a/js/certificate_edit_modal.js +++ b/js/certificate_edit_modal.js @@ -21,6 +21,7 @@ function populateCertificateEditModal(client_id, certificate_id) { document.getElementById("editIssuedBy").value = certificate.certificate_issued_by; document.getElementById("editExpire").value = certificate.certificate_expire; document.getElementById("editPublicKey").value = certificate.certificate_public_key; + document.getElementById("editNotes").value = certificate.certificate_notes; // Select the domain dropdown var domainDropdown = document.getElementById("editDomainId"); diff --git a/post/certificate.php b/post/certificate.php index 8efdbcc1..b5a93c35 100644 --- a/post/certificate.php +++ b/post/certificate.php @@ -14,6 +14,7 @@ if (isset($_POST['add_certificate'])) { $issued_by = sanitizeInput($_POST['issued_by']); $expire = sanitizeInput($_POST['expire']); $public_key = sanitizeInput($_POST['public_key']); + $notes = sanitizeInput($_POST['notes']); $domain_id = intval($_POST['domain_id']); // Parse public key data for a manually provided public key @@ -32,7 +33,7 @@ if (isset($_POST['add_certificate'])) { $expire = "'" . $expire . "'"; } - mysqli_query($mysqli,"INSERT INTO certificates SET certificate_name = '$name', certificate_domain = '$domain', certificate_issued_by = '$issued_by', certificate_expire = $expire, certificate_public_key = '$public_key', certificate_domain_id = $domain_id, certificate_client_id = $client_id"); + mysqli_query($mysqli,"INSERT INTO certificates SET certificate_name = '$name', certificate_domain = '$domain', certificate_issued_by = '$issued_by', certificate_expire = $expire, certificate_public_key = '$public_key', certificate_notes = '$notes', certificate_domain_id = $domain_id, certificate_client_id = $client_id"); $certificate_id = mysqli_insert_id($mysqli); @@ -55,6 +56,7 @@ if (isset($_POST['edit_certificate'])) { $issued_by = sanitizeInput($_POST['issued_by']); $expire = sanitizeInput($_POST['expire']); $public_key = sanitizeInput($_POST['public_key']); + $notes = sanitizeInput($_POST['notes']); $domain_id = intval($_POST['domain_id']); $client_id = intval($_POST['client_id']); @@ -74,7 +76,7 @@ if (isset($_POST['edit_certificate'])) { $expire = "'" . $expire . "'"; } - mysqli_query($mysqli,"UPDATE certificates SET certificate_name = '$name', certificate_domain = '$domain', certificate_issued_by = '$issued_by', certificate_expire = $expire, certificate_public_key = '$public_key', certificate_domain_id = '$domain_id' WHERE certificate_id = $certificate_id"); + mysqli_query($mysqli,"UPDATE certificates SET certificate_name = '$name', certificate_domain = '$domain', certificate_issued_by = '$issued_by', certificate_expire = $expire, certificate_public_key = '$public_key', certificate_notes = '$notes', certificate_domain_id = '$domain_id' WHERE certificate_id = $certificate_id"); //Logging mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Certificate', log_action = 'Modify', log_description = '$session_name modified certificate $name', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_client_id = $client_id, log_user_id = $session_user_id, log_entity_id = $certificate_id"); From 756c3aa7ca75848a3bd2b536cb4b0feb2ca1ca87 Mon Sep 17 00:00:00 2001 From: Marcus Hill Date: Sun, 31 Dec 2023 11:20:43 +0000 Subject: [PATCH 05/10] Tidy for consistency --- client_certificate_edit_modal.php | 12 ++++++------ client_domain_edit_modal.php | 10 +++++----- js/certificate_edit_modal.js | 12 ++++++------ 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/client_certificate_edit_modal.php b/client_certificate_edit_modal.php index f3bc8638..13e55c14 100644 --- a/client_certificate_edit_modal.php +++ b/client_certificate_edit_modal.php @@ -2,7 +2,7 @@ @@ -61,13 +61,13 @@
- +
- +
diff --git a/client_domain_edit_modal.php b/client_domain_edit_modal.php index 6d0e665d..07e90b79 100644 --- a/client_domain_edit_modal.php +++ b/client_domain_edit_modal.php @@ -33,7 +33,7 @@
- +
@@ -43,7 +43,7 @@
- @@ -54,7 +54,7 @@
- @@ -65,13 +65,13 @@
- +
- +
diff --git a/js/certificate_edit_modal.js b/js/certificate_edit_modal.js index 2beb1bee..6ac93561 100644 --- a/js/certificate_edit_modal.js +++ b/js/certificate_edit_modal.js @@ -14,14 +14,14 @@ function populateCertificateEditModal(client_id, certificate_id) { const domains = response.domains; // Populate the cert modal fields - document.getElementById("editHeader").innerText = certificate.certificate_name; + document.getElementById("editCertificateHeader").innerText = certificate.certificate_name; document.getElementById("editCertificateId").value = certificate_id; document.getElementById("editCertificateName").value = certificate.certificate_name; - document.getElementById("editDomain").value = certificate.certificate_domain; - document.getElementById("editIssuedBy").value = certificate.certificate_issued_by; - document.getElementById("editExpire").value = certificate.certificate_expire; - document.getElementById("editPublicKey").value = certificate.certificate_public_key; - document.getElementById("editNotes").value = certificate.certificate_notes; + document.getElementById("editCertificateDomain").value = certificate.certificate_domain; + document.getElementById("editCertificateIssuedBy").value = certificate.certificate_issued_by; + document.getElementById("editCertificateExpire").value = certificate.certificate_expire; + document.getElementById("editCertificatePublicKey").value = certificate.certificate_public_key; + document.getElementById("editCertificateNotes").value = certificate.certificate_notes; // Select the domain dropdown var domainDropdown = document.getElementById("editDomainId"); From 78f79759dc3145e40a37f0f99f7585b4e37a80ec Mon Sep 17 00:00:00 2001 From: Marcus Hill Date: Sun, 31 Dec 2023 12:05:11 +0000 Subject: [PATCH 06/10] Correct comments --- post/certificate.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/post/certificate.php b/post/certificate.php index b5a93c35..2a699c7f 100644 --- a/post/certificate.php +++ b/post/certificate.php @@ -140,11 +140,11 @@ if (isset($_POST['bulk_delete_certificates'])) { validateCSRFToken($_POST['csrf_token']); $count = 0; // Default 0 - $certificate_ids = $_POST['certificate_ids']; // Get array of scheduled tickets IDs to be deleted + $certificate_ids = $_POST['certificate_ids']; // Get array of cert IDs to be deleted if (!empty($certificate_ids)) { - // Cycle through array and delete each scheduled ticket + // Cycle through array and delete each network foreach ($certificate_ids as $certificate_id) { $certificate_id = intval($certificate_id); From 224aa00694cbb302f215c751b692c8e139d4e16a Mon Sep 17 00:00:00 2001 From: Marcus Hill Date: Sun, 31 Dec 2023 12:05:25 +0000 Subject: [PATCH 07/10] Correct comments --- post/certificate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/post/certificate.php b/post/certificate.php index 2a699c7f..554f8908 100644 --- a/post/certificate.php +++ b/post/certificate.php @@ -144,7 +144,7 @@ if (isset($_POST['bulk_delete_certificates'])) { if (!empty($certificate_ids)) { - // Cycle through array and delete each network + // Cycle through array and delete each certificate foreach ($certificate_ids as $certificate_id) { $certificate_id = intval($certificate_id); From 9076012d2a8d19af8832d0e688130109cf3436b8 Mon Sep 17 00:00:00 2001 From: Marcus Hill Date: Sun, 31 Dec 2023 12:25:12 +0000 Subject: [PATCH 08/10] Bugfix Undefined variable: service_created_at --- client_services.php | 1 + 1 file changed, 1 insertion(+) diff --git a/client_services.php b/client_services.php index 06cd1d81..6dc7985f 100644 --- a/client_services.php +++ b/client_services.php @@ -74,6 +74,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); $service_importance = nullable_htmlentities($row['service_importance']); $service_backup = nullable_htmlentities($row['service_backup']); $service_notes = nullable_htmlentities($row['service_notes']); + //$service_created_at = nullable_htmlentities($row['service_created_at']); $service_updated_at = nullable_htmlentities($row['service_updated_at']); $service_review_due = nullable_htmlentities($row['service_review_due']); From 1b567ee253fa68f71adabb1ac904b94ebc93bbdb Mon Sep 17 00:00:00 2001 From: Marcus Hill Date: Sun, 31 Dec 2023 12:49:58 +0000 Subject: [PATCH 09/10] Add multi-select to networks, certificates and domains. Fix multi-select count bug --- client_certificates.php | 3 +- client_domains.php | 162 +++++++++++++++----------- client_networks.php | 250 ++++++++++++++++++++++------------------ js/multi_actions.js | 10 +- post/certificate.php | 7 +- post/domain.php | 30 +++++ post/network.php | 30 +++++ scheduled_tickets.php | 6 +- 8 files changed, 313 insertions(+), 185 deletions(-) diff --git a/client_certificates.php b/client_certificates.php index 51adf31d..e3bdec79 100644 --- a/client_certificates.php +++ b/client_certificates.php @@ -78,7 +78,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
- +
Name @@ -104,6 +104,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
+
diff --git a/client_domains.php b/client_domains.php index c6a027cf..c86f16c4 100644 --- a/client_domains.php +++ b/client_domains.php @@ -52,88 +52,116 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
+
+
- - "> - - - - - - - - - - + - $sql_domain_webhost = mysqli_query($mysqli, "SELECT vendor_name FROM vendors WHERE vendor_id = $domain_webhost"); - $row = mysqli_fetch_array($sql_domain_webhost); - $domain_webhost_name = "-"; - if ($row) { - $domain_webhost_name = nullable_htmlentities($row['vendor_name']); - } - - ?> +
DomainRegistrarWeb HostExpiresAction
+ "> - - - - - + + + + + - + + - -
)" data-target="#editDomainModal"> - +
+
DomainRegistrarWeb HostExpiresAction
+ while ($row = mysqli_fetch_array($sql)) { + $domain_id = intval($row['domain_id']); + $domain_name = nullable_htmlentities($row['domain_name']); + $domain_registrar = intval($row['domain_registrar']); + $domain_webhost = intval($row['domain_webhost']); + $domain_expire = nullable_htmlentities($row['domain_expire']); + $domain_registrar_name = nullable_htmlentities($row['vendor_name']); + $domain_created_at = nullable_htmlentities($row['domain_created_at']); + if (empty($domain_registrar_name)) { + $domain_registrar_name = "-"; + } + + $sql_domain_webhost = mysqli_query($mysqli, "SELECT vendor_name FROM vendors WHERE vendor_id = $domain_webhost"); + $row = mysqli_fetch_array($sql_domain_webhost); + $domain_webhost_name = "-"; + if ($row) { + $domain_webhost_name = nullable_htmlentities($row['vendor_name']); + } + + ?> + + +
+ + +
+ + )" data-target="#editDomainModal"> + + + + + + + + + + + + + +
+ ?> - -require_once "footer.php"; + + + + -
-
-

Networks

-
-
- - - @@ -79,7 +79,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
- +
Client From 55d716642aeded5497b14942fa324319406a32f7 Mon Sep 17 00:00:00 2001 From: Marcus Hill Date: Sun, 31 Dec 2023 13:02:37 +0000 Subject: [PATCH 10/10] Bugfix --- client_services.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client_services.php b/client_services.php index 6dc7985f..bb5adc09 100644 --- a/client_services.php +++ b/client_services.php @@ -74,7 +74,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); $service_importance = nullable_htmlentities($row['service_importance']); $service_backup = nullable_htmlentities($row['service_backup']); $service_notes = nullable_htmlentities($row['service_notes']); - //$service_created_at = nullable_htmlentities($row['service_created_at']); + $service_created_at = nullable_htmlentities($row['service_created_at']); $service_updated_at = nullable_htmlentities($row['service_updated_at']); $service_review_due = nullable_htmlentities($row['service_review_due']);