I dont know if you can read PHP but this is the main chunk of code that is updated for the majority of the pirep.
date_default_timezone_set('UTC');
$today = date("Y-m-d");
$time = date("Y-m-d H:i:s");
$filled = false;
if(isset($_POST['btnpirep']))
{
$date_filled = addslashes(trim($_POST['date_filled']));
$date = addslashes(trim($_POST['date']));
$depicao = strtoupper(addslashes(trim($_POST['depicao'])));
$arricao = strtoupper(addslashes(trim($_POST['arricao'])));
$route = strtoupper(addslashes(trim($_POST['route'])));
$aircraft = strtoupper(addslashes(trim($_POST['aircraft'])));
$fuel = addslashes(trim(preg_replace("/[^0-9,.]/", "", $_POST['fuel'])));
$miles = addslashes(trim(preg_replace("/[^0-9,.]/", "", $_POST['miles'])));
$pax = addslashes(trim(preg_replace("/[^0-9,.]/", "", $_POST['pax'])));
$dh = addslashes(trim($_POST['dh']));
$dm = addslashes(trim($_POST['dm']));
$ds = "00";
$ah = addslashes(trim($_POST['ah']));
$am = addslashes(trim($_POST['am']));
$as = "00";
$th = addslashes(trim($_POST['th']));
$tm = addslashes(trim($_POST['tm']));
$ts = "00";
$comments = addslashes(trim($_POST['comments']));
$pilot = addslashes(trim($_POST['pilot']));
$flight_number = strtoupper(addslashes(trim($_POST['flight_number'])));
if ((((( empty($date) ) || ( empty($depicao) ) || ( strlen($depicao) <> 4 ) || ( empty($arricao) ) || ( empty($pax) ) || ( strlen($arricao) <> 4 ) || ( empty($route) ) || ( empty($flight_number) ) || ( empty($aircraft) || ( empty($miles) || ( empty($pilot) ))))))) {
echo '<script>alert("Some fields are not fully filled in correctly.");</script>';
echo '<script>history.back(1);</script>';
exit;
}
$paym = getClientPay($cCode, $conn);
$pay = $miles * $paym;
$pilotid = $_SESSION['pilotid'];
$query_in = "CALL spdInsPIREP('$date_filled', '$date', '$depicao', '$arricao', '$route', '$aircraft', '$miles', '$pax', '$dh:$dm:$ds', '$ah:$am:$as', '$th:$tm:$ts', '$pay', '$comments', '$pilotid', '$flight_number', '$cCode', '$pilot', '$fuel')";
$in = mysqli_query($conn, $query_in) or die(mysqli_error($conn));
$filled = true;
This section is what info is being used for live update (basicly live tracking of flights to the website where it shows up on a map.
$flights_coordinates = array();
$jsonarray = array();
$index = 0;
$query_dep = "CALL spdGetAirport('$cCode','$depicao')";
$dep = mysqli_query($conn, $query_dep, MYSQLI_STORE_RESULT) or die(mysqli_error($conn));
$row_dep = mysqli_fetch_assoc($dep);
clearStoredResults($conn);
$query_arr = "CALL spdGetAirport('$cCode','$arricao')";
$arr = mysqli_query($conn, $query_arr, MYSQLI_STORE_RESULT) or die(mysqli_error($conn));
$row_arr = mysqli_fetch_assoc($arr);
clearStoredResults($conn);
$last_lat = floatval($row_dep["latitude_deg"]);
$last_long = floatval($row_dep["longitude_deg"]);
$flights_coordinates ["lat"] = floatval($row_dep["latitude_deg"]);
$flights_coordinates ["lng"] = floatval($row_dep["longitude_deg"]);
$flights_coordinates ["name"] = $depicao;
$jsonarray [0][$index] = $flights_coordinates;
$index ++;
$flights_coordinates ["lat"] = floatval($row_arr["latitude_deg"]);
$flights_coordinates ["lng"] = floatval($row_arr["longitude_deg"]);
$flights_coordinates ["name"] = $arricao;
$jsonarray [0][$index] = $flights_coordinates;
The live stuff gets pushed to a MySQL DB about every 30 sec or so (rough guess) and then the rest of the info is submitted once the flight is over. Ideally, we could connect DCS to the ACARS program that the site comes built-in with but the dev is not being very helpful on that part and I don't feel like digging through his compile dlls to try and mod something.