diff --git a/client_asset_add_modal.php b/client_asset_add_modal.php index b263b16e..d546991b 100644 --- a/client_asset_add_modal.php +++ b/client_asset_add_modal.php @@ -18,6 +18,9 @@ + @@ -120,6 +123,89 @@ +
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+
@@ -182,65 +268,6 @@
-
- -
-
- -
- -
-
- -
- -
-
- -
- -
-
- -
-
-
-
- -
- -
-
- -
- -
-
- -
- -
-
- -
- -
-
-
diff --git a/client_asset_copy_modal.php b/client_asset_copy_modal.php index b54bfa83..10ea9946 100644 --- a/client_asset_copy_modal.php +++ b/client_asset_copy_modal.php @@ -16,6 +16,9 @@ + @@ -117,6 +120,89 @@
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ > +
+
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+
@@ -177,65 +263,6 @@
-
- -
-
- -
- -
-
- -
- -
-
- -
- -
-
- > -
-
-
-
- -
- -
-
- -
- -
-
- -
- -
-
- -
- -
-
-
diff --git a/client_asset_details.php b/client_asset_details.php index bef7c1e6..a68e6ec1 100644 --- a/client_asset_details.php +++ b/client_asset_details.php @@ -44,8 +44,10 @@ if (isset($_GET['asset_id'])) { } else { $asset_ip_display = "$asset_ip"; } + $asset_nat_ip = nullable_htmlentities($row['asset_nat_ip']); $asset_mac = nullable_htmlentities($row['asset_mac']); $asset_uri = nullable_htmlentities($row['asset_uri']); + $asset_uri_2 = nullable_htmlentities($row['asset_uri_2']); $asset_status = nullable_htmlentities($row['asset_status']); $asset_purchase_date = nullable_htmlentities($row['asset_purchase_date']); $asset_warranty_expire = nullable_htmlentities($row['asset_warranty_expire']); diff --git a/client_asset_edit_modal.php b/client_asset_edit_modal.php index 411d0845..8f3c73a9 100644 --- a/client_asset_edit_modal.php +++ b/client_asset_edit_modal.php @@ -18,6 +18,9 @@ + @@ -119,6 +122,95 @@
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ > +
+
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+
@@ -193,71 +285,6 @@
-
- -
-
- -
- -
-
- -
- -
-
- -
- -
-
- > -
-
-
-
- -
- -
-
- -
- -
-
- -
- -
-
- -
- -
-
-
diff --git a/client_assets.php b/client_assets.php index 6777acdb..3572c8b1 100644 --- a/client_assets.php +++ b/client_assets.php @@ -206,8 +206,10 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); } else { $asset_ip_display = "$asset_ip"; } + $asset_nat_ip = nullable_htmlentities($row['asset_nat_ip']); $asset_mac = nullable_htmlentities($row['asset_mac']); $asset_uri = nullable_htmlentities($row['asset_uri']); + $asset_uri_2 = nullable_htmlentities($row['asset_uri_2']); $asset_status = nullable_htmlentities($row['asset_status']); $asset_purchase_date = nullable_htmlentities($row['asset_purchase_date']); $asset_warranty_expire = nullable_htmlentities($row['asset_warranty_expire']); diff --git a/client_login_add_modal.php b/client_login_add_modal.php index 458d7860..ddcc799d 100644 --- a/client_login_add_modal.php +++ b/client_login_add_modal.php @@ -103,6 +103,16 @@
+
+ +
+
+ +
+ +
+
+
diff --git a/client_login_edit_modal.php b/client_login_edit_modal.php index 7aa1039f..209184f0 100644 --- a/client_login_edit_modal.php +++ b/client_login_edit_modal.php @@ -111,6 +111,22 @@
+
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+
diff --git a/client_logins.php b/client_logins.php index a7030acc..874f80f5 100644 --- a/client_logins.php +++ b/client_logins.php @@ -100,6 +100,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()")); } else { $login_uri_display = "$login_uri"; } + $login_uri_2 = nullable_htmlentities($row['login_uri_2']); $login_username = nullable_htmlentities(decryptLoginEntry($row['login_username'])); if (empty($login_username)) { $login_username_display = "-"; diff --git a/post/asset.php b/post/asset.php index e5298633..460f2ebf 100644 --- a/post/asset.php +++ b/post/asset.php @@ -20,8 +20,10 @@ if (isset($_POST['add_asset'])) { if($_POST['dhcp'] == 1){ $ip = 'DHCP'; } + $nat_ip = sanitizeInput($_POST['nat_ip']); $mac = sanitizeInput($_POST['mac']); $uri = sanitizeInput($_POST['uri']); + $uri_2 = sanitizeInput($_POST['uri_2']); $status = sanitizeInput($_POST['status']); $location = intval($_POST['location']); $vendor = intval($_POST['vendor']); @@ -49,7 +51,7 @@ if (isset($_POST['add_asset'])) { $alert_extended = ""; - mysqli_query($mysqli,"INSERT INTO assets SET asset_name = '$name', asset_description = '$description', asset_type = '$type', asset_make = '$make', asset_model = '$model', asset_serial = '$serial', asset_os = '$os', asset_ip = '$ip', asset_mac = '$mac', asset_uri = '$uri', asset_location_id = $location, asset_vendor_id = $vendor, asset_contact_id = $contact, asset_status = '$status', asset_purchase_date = $purchase_date, asset_warranty_expire = $warranty_expire, asset_install_date = $install_date, asset_notes = '$notes', asset_network_id = $network, asset_client_id = $client_id"); + mysqli_query($mysqli,"INSERT INTO assets SET asset_name = '$name', asset_description = '$description', asset_type = '$type', asset_make = '$make', asset_model = '$model', asset_serial = '$serial', asset_os = '$os', asset_ip = '$ip', asset_nat_ip = '$nat_ip', asset_mac = '$mac', asset_uri = '$uri', asset_uri_2 = '$uri_2', asset_location_id = $location, asset_vendor_id = $vendor, asset_contact_id = $contact, asset_status = '$status', asset_purchase_date = $purchase_date, asset_warranty_expire = $warranty_expire, asset_install_date = $install_date, asset_notes = '$notes', asset_network_id = $network, asset_client_id = $client_id"); $asset_id = mysqli_insert_id($mysqli); @@ -95,8 +97,10 @@ if (isset($_POST['edit_asset'])) { if($_POST['dhcp'] == 1){ $ip = 'DHCP'; } + $nat_ip = sanitizeInput($_POST['nat_ip']); $mac = sanitizeInput($_POST['mac']); $uri = sanitizeInput($_POST['uri']); + $uri_2 = sanitizeInput($_POST['uri_2']); $status = sanitizeInput($_POST['status']); $location = intval($_POST['location']); $vendor = intval($_POST['vendor']); @@ -126,7 +130,7 @@ if (isset($_POST['edit_asset'])) { $alert_extended = ""; - mysqli_query($mysqli,"UPDATE assets SET asset_name = '$name', asset_description = '$description', asset_type = '$type', asset_make = '$make', asset_model = '$model', asset_serial = '$serial', asset_os = '$os', asset_ip = '$ip', asset_mac = '$mac', asset_uri = '$uri', asset_location_id = $location, asset_vendor_id = $vendor, asset_contact_id = $contact, asset_status = '$status', asset_purchase_date = $purchase_date, asset_warranty_expire = $warranty_expire, asset_install_date = $install_date, asset_notes = '$notes', asset_network_id = $network WHERE asset_id = $asset_id"); + mysqli_query($mysqli,"UPDATE assets SET asset_name = '$name', asset_description = '$description', asset_type = '$type', asset_make = '$make', asset_model = '$model', asset_serial = '$serial', asset_os = '$os', asset_ip = '$ip', asset_nat_ip = '$nat_ip', asset_mac = '$mac', asset_uri = '$uri', asset_uri_2 = '$uri_2', asset_location_id = $location, asset_vendor_id = $vendor, asset_contact_id = $contact, asset_status = '$status', asset_purchase_date = $purchase_date, asset_warranty_expire = $warranty_expire, asset_install_date = $install_date, asset_notes = '$notes', asset_network_id = $network WHERE asset_id = $asset_id"); //If login exists then update the login if ($login_id > 0 && !empty($_POST['username'])) { diff --git a/post/client_logins_model.php b/post/client_logins_model.php index 634e888d..68731462 100644 --- a/post/client_logins_model.php +++ b/post/client_logins_model.php @@ -3,6 +3,7 @@ $client_id = intval($_POST['client_id']); $name = sanitizeInput($_POST['name']); $description = sanitizeInput($_POST['description']); $uri = sanitizeInput($_POST['uri']); +$uri_2 = sanitizeInput($_POST['uri_2']); $username = encryptLoginEntry(trim($_POST['username'])); $password = encryptLoginEntry(trim($_POST['password'])); $otp_secret = sanitizeInput($_POST['otp_secret']); diff --git a/post/login.php b/post/login.php index 042fd256..95b9aa43 100644 --- a/post/login.php +++ b/post/login.php @@ -11,7 +11,7 @@ if (isset($_POST['add_login'])) { require_once 'post/client_logins_model.php'; - mysqli_query($mysqli,"INSERT INTO logins SET login_name = '$name', login_description = '$description', login_uri = '$uri', login_username = '$username', login_password = '$password', login_otp_secret = '$otp_secret', login_note = '$note', login_important = $important, login_contact_id = $contact_id, login_vendor_id = $vendor_id, login_asset_id = $asset_id, login_software_id = $software_id, login_client_id = $client_id"); + mysqli_query($mysqli,"INSERT INTO logins SET login_name = '$name', login_description = '$description', login_uri = '$uri', login_uri_2 = '$uri_2', login_username = '$username', login_password = '$password', login_otp_secret = '$otp_secret', login_note = '$note', login_important = $important, login_contact_id = $contact_id, login_vendor_id = $vendor_id, login_asset_id = $asset_id, login_software_id = $software_id, login_client_id = $client_id"); $login_id = mysqli_insert_id($mysqli); @@ -42,7 +42,7 @@ if (isset($_POST['edit_login'])) { } // Update the login entry with the new details - mysqli_query($mysqli,"UPDATE logins SET login_name = '$name', login_description = '$description', login_uri = '$uri', login_username = '$username', login_password = '$password', login_otp_secret = '$otp_secret', login_note = '$note', login_important = $important, login_contact_id = $contact_id, login_vendor_id = $vendor_id, login_asset_id = $asset_id, login_software_id = $software_id WHERE login_id = $login_id"); + mysqli_query($mysqli,"UPDATE logins SET login_name = '$name', login_description = '$description', login_uri = '$uri', login_uri_2 = '$uri_2', login_username = '$username', login_password = '$password', login_otp_secret = '$otp_secret', login_note = '$note', login_important = $important, login_contact_id = $contact_id, login_vendor_id = $vendor_id, login_asset_id = $asset_id, login_software_id = $software_id WHERE login_id = $login_id"); // Logging mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Login', log_action = 'Modify', log_description = '$session_name modified login $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 = $login_id");