diff --git a/add_client_domain_modal.php b/add_client_domain_modal.php
new file mode 100644
index 00000000..82d0b152
--- /dev/null
+++ b/add_client_domain_modal.php
@@ -0,0 +1,60 @@
+
\ No newline at end of file
diff --git a/client.php b/client.php
index 57f69b0a..cc5f7f3e 100644
--- a/client.php
+++ b/client.php
@@ -34,6 +34,8 @@ if(isset($_GET['client_id'])){
$num_logins = $row['num'];
$row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('client_network_id') AS num FROM client_networks WHERE client_id = $client_id"));
$num_networks = $row['num'];
+ $row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('client_domain_id') AS num FROM client_domains WHERE client_id = $client_id"));
+ $num_domains = $row['num'];
$row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('invoice_id') AS num FROM invoices WHERE client_id = $client_id"));
$num_invoices = $row['num'];
$row = mysqli_fetch_assoc(mysqli_query($mysqli,"SELECT COUNT('client_note_id') AS num FROM client_notes WHERE client_id = $client_id"));
@@ -56,13 +58,14 @@ if(isset($_GET['client_id'])){
New Vendor
New Login
New Network
+ New Domain
New Invoice
New Quote
New Attachment
New Note
- Edit
- Delete
+ Edit
+ Delete
@@ -88,6 +91,7 @@ if(isset($_GET['client_id'])){
+
diff --git a/client_domains.php b/client_domains.php
new file mode 100644
index 00000000..436fe75b
--- /dev/null
+++ b/client_domains.php
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+ | Domain |
+ Registrar |
+ Expire |
+ Server |
+ Actions |
+
+
+
+
+
+ |
+ |
+ |
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/client_nav.php b/client_nav.php
index 2cd68850..e4322623 100644
--- a/client_nav.php
+++ b/client_nav.php
@@ -38,6 +38,12 @@
+
+
+ Domains
+
+
+
Invoices
diff --git a/client_routes.php b/client_routes.php
index 53bec3fb..ddbaeaca 100644
--- a/client_routes.php
+++ b/client_routes.php
@@ -22,6 +22,9 @@ if(isset($_GET['tab'])){
elseif($_GET['tab'] == "networks"){
include("client_networks.php");
}
+ elseif($_GET['tab'] == "domains"){
+ include("client_domains.php");
+ }
elseif($_GET['tab'] == "invoices"){
include("client_invoices.php");
}
diff --git a/edit_client_domain.php b/edit_client_domain.php
new file mode 100644
index 00000000..f9f9972c
--- /dev/null
+++ b/edit_client_domain.php
@@ -0,0 +1,60 @@
+
\ No newline at end of file
diff --git a/edit_client_domain_modal.php b/edit_client_domain_modal.php
new file mode 100644
index 00000000..f9f9972c
--- /dev/null
+++ b/edit_client_domain_modal.php
@@ -0,0 +1,60 @@
+
\ No newline at end of file
diff --git a/post.php b/post.php
index ce4c3ea4..d30b1a48 100644
--- a/post.php
+++ b/post.php
@@ -792,6 +792,49 @@ if(isset($_GET['delete_client_network'])){
}
+if(isset($_POST['add_client_domain'])){
+
+ $client_id = intval($_POST['client_id']);
+ $name = strip_tags(mysqli_real_escape_string($mysqli,$_POST['name']));
+ $registrar = strip_tags(mysqli_real_escape_string($mysqli,$_POST['registrar']));
+ $expire = strip_tags(mysqli_real_escape_string($mysqli,$_POST['expire']));
+ $server = strip_tags(mysqli_real_escape_string($mysqli,$_POST['server']));
+
+ mysqli_query($mysqli,"INSERT INTO client_domains SET client_domain_name = '$name', client_domain_registrar = '$registrar', client_domain_expire = '$expire', client_domain_server = '$server', client_id = $client_id");
+
+ $_SESSION['alert_message'] = "Domain added";
+
+ header("Location: " . $_SERVER["HTTP_REFERER"]);
+
+}
+
+if(isset($_POST['edit_client_domain'])){
+
+ $client_domain_id = intval($_POST['client_domain_id']);
+ $name = strip_tags(mysqli_real_escape_string($mysqli,$_POST['name']));
+ $registrar = strip_tags(mysqli_real_escape_string($mysqli,$_POST['registrar']));
+ $expire = strip_tags(mysqli_real_escape_string($mysqli,$_POST['expire']));
+ $server = strip_tags(mysqli_real_escape_string($mysqli,$_POST['server']));
+
+ mysqli_query($mysqli,"UPDATE client_domains SET client_domain_name = '$name', client_domain_registrar = '$registrar', client_domain_expire = '$expire', client_domain_server = '$server' WHERE client_domain_id = $client_domain_id");
+
+ $_SESSION['alert_message'] = "Domain updated";
+
+ header("Location: " . $_SERVER["HTTP_REFERER"]);
+
+}
+
+if(isset($_GET['delete_client_domain'])){
+ $client_domain_id = intval($_GET['delete_client_domain']);
+
+ mysqli_query($mysqli,"DELETE FROM client_domains WHERE client_domain_id = $client_domain_id");
+
+ $_SESSION['alert_message'] = "Domain deleted";
+
+ header("Location: " . $_SERVER["HTTP_REFERER"]);
+
+}
+
if(isset($_POST['change_password'])){
$current_url = $_POST['current_url'];
$new_password = mysqli_real_escape_string($mysqli,$_POST['new_password']);