Added comments and version to Telemetry

This commit is contained in:
johnnyq 2023-01-24 20:24:15 -05:00
parent 3dc1f11a56
commit f670efa16a
2 changed files with 9 additions and 0 deletions

View File

@ -1130,6 +1130,7 @@ if(isset($_POST['send_telemetry_data'])){
validateAdminRole();
$config_telemetry = intval($_POST['config_telemetry']);
$comments = $_POST['comments'];
mysqli_query($mysqli,"UPDATE settings SET config_telemetry = $config_telemetry WHERE company_id = $session_company_id");
@ -1141,6 +1142,7 @@ if(isset($_POST['send_telemetry_data'])){
$state = $row['company_state'];
$country = $row['company_country'];
$currency = $row['company_currency'];
$current_version = exec("git rev-parse HEAD");
// Basic Telemetry
if($config_telemetry == 1){
@ -1173,11 +1175,13 @@ if(isset($_POST['send_telemetry_data'])){
$postdata = http_build_query(
array(
'version' => "$current_version",
'company_name' => "$company_name",
'city' => "$city",
'state' => "$state",
'country' => "$country",
'currency' => "$currency",
'comments' => "$comments",
'user_count' => $user_count,
'client_count' => $client_count,
'invoice_count' => $invoice_count,

View File

@ -21,6 +21,11 @@
</div>
</div>
<div class="form-group">
<label>Comments</label>
<textarea class="form-control" rows="4" name="comments" placeholder="Any Comments to send before hitting Send Telemetry Data?"></textarea>
</div>
<hr>
<?php if ($config_telemetry > 0) { ?>