diff --git a/client_contact_details.php b/client_contact_details.php
index 4a6c3f48..6f8e1c00 100644
--- a/client_contact_details.php
+++ b/client_contact_details.php
@@ -67,9 +67,9 @@ if (isset($_GET['contact_id'])) {
">
-
-
-
+
+
+
@@ -181,7 +181,7 @@ if (isset($_GET['contact_id'])) {
$asset_vendor_id = $row['asset_vendor_id'];
$asset_location_id = $row['asset_location_id'];
$asset_network_id = $row['asset_network_id'];
-
+ $asset_contact_id = $row['asset_contact_id'];
if ($asset_type == 'Laptop') {
$device_icon = "laptop";
} elseif ($asset_type == 'Desktop') {
@@ -213,7 +213,8 @@ if (isset($_GET['contact_id'])) {
?>
|
-
+
+
|
|
|
@@ -360,6 +361,7 @@ if (isset($_GET['contact_id'])) {
diff --git a/database_updates.php b/database_updates.php
index 09ee055e..29ff09b3 100644
--- a/database_updates.php
+++ b/database_updates.php
@@ -768,11 +768,17 @@ if(LATEST_DATABASE_VERSION > CURRENT_DATABASE_VERSION){
mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.3.3'");
}
- //if(CURRENT_DATABASE_VERSION == '0.3.3'){
- // Insert queries here required to update to DB version 0.3.4
+ if(CURRENT_DATABASE_VERSION == '0.3.3'){
+ mysqli_query($mysqli, "ALTER TABLE `settings` ADD `config_telemetry` TINYINT(1) DEFAULT 0 AFTER `config_theme`");
+
+ mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.3.4'");
+ }
+
+ //if(CURRENT_DATABASE_VERSION == '0.3.4'){
+ // Insert queries here required to update to DB version 0.3.5
// Then, update the database to the next sequential version
- // mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.3.4'");
+ // mysqli_query($mysqli, "UPDATE `settings` SET `config_current_database_version` = '0.3.5'");
//}
diff --git a/database_version.php b/database_version.php
index e2f7de8c..8f7c311e 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.3.3");
\ No newline at end of file
+DEFINE("LATEST_DATABASE_VERSION", "0.3.4");
\ No newline at end of file
diff --git a/db.sql b/db.sql
index 4befe46d..9a3bae00 100644
--- a/db.sql
+++ b/db.sql
@@ -1080,6 +1080,7 @@ CREATE TABLE `settings` (
`config_module_enable_accounting` tinyint(1) NOT NULL DEFAULT 1,
`config_module_enable_ticketing` tinyint(1) NOT NULL DEFAULT 1,
`config_theme` varchar(200) DEFAULT 'blue',
+ `config_telemetry` tinyint(1) DEFAULT 0,
PRIMARY KEY (`company_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -1518,4 +1519,4 @@ CREATE TABLE `vendors` (
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2023-01-24 16:19:14
+-- Dump completed on 2023-01-24 19:27:29
diff --git a/get_settings.php b/get_settings.php
index 6efad592..01f2e736 100644
--- a/get_settings.php
+++ b/get_settings.php
@@ -79,13 +79,15 @@ $config_module_enable_ticketing = $row['config_module_enable_ticketing'];
$config_module_enable_accounting = $row['config_module_enable_accounting'];
// Currency
-
$config_currency_format = "US_en";
// Theme
$config_theme = $row['config_theme'];
$config_theme_mode = "dark_mode";
+// Telemetry
+$config_telemetry = intval($row['config_telemetry']);
+
$colors_array = array(
'blue',
'green',
diff --git a/post.php b/post.php
index db830f35..d748353e 100644
--- a/post.php
+++ b/post.php
@@ -1108,6 +1108,23 @@ if(isset($_POST['edit_module_settings'])){
}
+if(isset($_POST['edit_telemetry_settings'])){
+
+ validateAdminRole();
+
+ $config_telemetry = intval($_POST['config_telemetry']);
+
+ mysqli_query($mysqli,"UPDATE settings SET config_telemetry = $config_telemetry WHERE company_id = $session_company_id");
+
+ // Logging
+ mysqli_query($mysqli,"INSERT INTO logs SET log_type = 'Settings', log_action = 'Modify', log_description = '$session_name modified telemetry settings', log_ip = '$session_ip', log_user_agent = '$session_user_agent', log_user_id = $session_user_id, company_id = $session_company_id");
+
+ $_SESSION['alert_message'] = "Telemetry settings updated";
+
+ header("Location: " . $_SERVER["HTTP_REFERER"]);
+
+}
+
if(isset($_POST['enable_2fa'])){
// CSRF Check
diff --git a/settings_side_nav.php b/settings_side_nav.php
index f81125ee..4f08ac35 100644
--- a/settings_side_nav.php
+++ b/settings_side_nav.php
@@ -152,6 +152,14 @@
+
+ "
+ href="settings_telemetry.php">
+
+ Telemetry
+
+
+
"
href="settings_backup.php">
diff --git a/settings_telemetry.php b/settings_telemetry.php
new file mode 100644
index 00000000..29aa641c
--- /dev/null
+++ b/settings_telemetry.php
@@ -0,0 +1,32 @@
+
+
+
+
+