diff --git a/client_asset_add_modal.php b/client_asset_add_modal.php
index 1a2b5a8a..bf52d237 100644
--- a/client_asset_add_modal.php
+++ b/client_asset_add_modal.php
@@ -228,6 +228,16 @@
+
+
diff --git a/client_asset_copy_modal.php b/client_asset_copy_modal.php
index 46a6cb50..4f6b0294 100644
--- a/client_asset_copy_modal.php
+++ b/client_asset_copy_modal.php
@@ -223,6 +223,16 @@
+
+
diff --git a/client_asset_edit_modal.php b/client_asset_edit_modal.php
index 16c267a3..421ca8d3 100644
--- a/client_asset_edit_modal.php
+++ b/client_asset_edit_modal.php
@@ -243,6 +243,16 @@
+
+
diff --git a/client_assets.php b/client_assets.php
index 14404dc7..bd66ca14 100644
--- a/client_assets.php
+++ b/client_assets.php
@@ -192,6 +192,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
$asset_ip_display = "$asset_ip
";
}
$asset_mac = nullable_htmlentities($row['asset_mac']);
+ $asset_uri = nullable_htmlentities($row['asset_uri']);
$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']);
@@ -254,6 +255,9 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
+
+
+
0) {
?>
diff --git a/database_updates.php b/database_updates.php
index 69510cc3..877a7d36 100644
--- a/database_updates.php
+++ b/database_updates.php
@@ -1306,6 +1306,14 @@ if (LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION) {
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.7.9'");
}
+ if (CURRENT_DATABASE_VERSION == '0.7.9') {
+ //Insert queries here required to update to DB version 0.8.0
+ mysqli_query($mysqli, "ALTER TABLE `assets` ADD `asset_uri` VARCHAR(250) DEFAULT NULL AFTER `asset_mac`");
+
+ // Then, update the database to the next sequential version
+ mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.8.0'");
+ }
+
//if (CURRENT_DATABASE_VERSION == '0.7.9') {
//Insert queries here required to update to DB version 0.8.0
diff --git a/database_version.php b/database_version.php
index eba877fa..eefc8ad2 100644
--- a/database_version.php
+++ b/database_version.php
@@ -5,4 +5,4 @@
* It is used in conjunction with database_updates.php
*/
-DEFINE("LATEST_DATABASE_VERSION", "0.7.9");
+DEFINE("LATEST_DATABASE_VERSION", "0.8.0");
diff --git a/post/asset.php b/post/asset.php
index 26e78203..3acc09a8 100644
--- a/post/asset.php
+++ b/post/asset.php
@@ -18,6 +18,7 @@ if (isset($_POST['add_asset'])) {
$os = sanitizeInput($_POST['os']);
$ip = sanitizeInput($_POST['ip']);
$mac = sanitizeInput($_POST['mac']);
+ $uri = sanitizeInput($_POST['uri']);
$status = sanitizeInput($_POST['status']);
$location = intval($_POST['location']);
$vendor = intval($_POST['vendor']);
@@ -45,7 +46,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_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_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");
$asset_id = mysqli_insert_id($mysqli);
@@ -89,6 +90,7 @@ if (isset($_POST['edit_asset'])) {
$os = sanitizeInput($_POST['os']);
$ip = sanitizeInput($_POST['ip']);
$mac = sanitizeInput($_POST['mac']);
+ $uri = sanitizeInput($_POST['uri']);
$status = sanitizeInput($_POST['status']);
$location = intval($_POST['location']);
$vendor = intval($_POST['vendor']);
@@ -118,7 +120,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_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_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");
//If login exists then update the login
if ($login_id > 0 && !empty($_POST['username'])) {
|