First commit buildtool

This commit is contained in:
“VeLiTi”
2024-03-20 17:47:52 +01:00
parent 73baa19c2d
commit 8bc81c65ac
10 changed files with 970 additions and 11 deletions

52
dev.php
View File

@@ -3,25 +3,55 @@ ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
error_reporting(E_ALL);
include './assets/functions.php';
include './settings/settings.php';
include './settings/config.php';
include './settings/systemfirmware.php';
$pdo = dbConnect($dbname);
$sql = 'SELECT description FROM history where type="CarTest"';
$sql = 'SELECT rowID, productcode, productname, product_category,sn from products where status = "1" and build = "1"';
$stmt = $pdo->prepare($sql);
//Excute Query
$stmt->execute();
//Get results
$messages = $stmt->fetchAll(PDO::FETCH_ASSOC);
//Excute Query
$stmt->execute();
//Get results
$messages = $stmt->fetchAll(PDO::FETCH_ASSOC);
$bearertoken = createCommunicationToken($_SESSION['userkey']);
$view ='
<p id="servicetoken" value="'.$token.'" hidden>'.$token.'</p>
<div style="width:70%">
<select id="productlist" name="productlist" >
<option selected value="0">Assign Product</option>
';
$car_data = [];
foreach ($messages as $message){
$car_data[] = json_decode(json_encode($message['description'],JSON_UNESCAPED_UNICODE));
$view .='<option value="'.$message["rowID"].'|'.$message["product_category"].'|'.$message["sn"].'">'.$message["productcode"].' - '.$message["productname"].'</option>';
}
print_r($car_data);
//$grouped = array_group_by($messages, "state", "city" );
$view .='</select>
<input type="hidden" id="lineToSend" >
</div>
<div style="position: relative;left:30%;top: -20px;">
<button class="button" onclick="startMaintenance()">Assembly</button>
<button class="button" id="connectButton" onClick="window.location.reload()">&#8634;</button>
</div>
<div>
<div id="readStatus" style="width: 75%;background-color: #f1f1f1;">
<div id="readBar"></div>
</div>
</div>
<div id="Device_output">
<div id="serialResults">
</div>
</div>
<script src = "https://legacy.veliti.nl/assets/readdevice.js?'.script_version.'"></script>
<script src = "https://legacy.veliti.nl/assets/charts.js?'.script_version.'"></script>
<script src = "https://legacy.veliti.nl/assets/jquery-2.1.4.min.js"></script>
<script src = "https://legacy.veliti.nl/assets/DYMO.Label.Framework.latest.js?'.script_version.'" type="text/javascript" charset="UTF-8"> </script>
';
//LABEL PRINTER niet vergeten
//add window.location.relead() after script
echo $view;
?>