diff --git a/setup.php b/setup.php index 214fba35..4e73fd3e 100644 --- a/setup.php +++ b/setup.php @@ -570,26 +570,18 @@ if(isset($_POST['add_company_settings'])){ if(isset($_POST['add_telemetry'])){ - $comments = trim(strip_tags(mysqli_real_escape_string($mysqli,$_POST['comments']))); + if($_POST['share_data'] == 1){ - $sql = mysqli_query($mysqli,"SELECT * FROM companies LIMIT 1"); - $row = mysqli_fetch_array($sql); + $comments = trim(strip_tags($_POST['comments'])); + + $sql = mysqli_query($mysqli,"SELECT * FROM companies LIMIT 1"); + $row = mysqli_fetch_array($sql); - $comments = $_POST['comments']; - - - if($_POST['company_name'] == 1){ $company_name = $row['company_name']; - } - - if($_POST['geographics'] == 1){ $city = $row['company_city']; $state = $row['company_state']; $country = $row['company_country']; $currency = $row['company_currency']; - } - - if($_POST['geographics'] == 1 OR $_POST['company_name'] == 1){ $postdata = http_build_query( array( @@ -612,7 +604,7 @@ if(isset($_POST['add_telemetry'])){ $context = stream_context_create($opts); - $result = file_get_contents('https://telemetry.itflow.com', false, $context); + $result = file_get_contents('https://telemetry.itflow.org', false, $context); echo $result; @@ -1017,18 +1009,13 @@ if(isset($_POST['add_telemetry'])){