First commit buildtool
This commit is contained in:
52
dev.php
52
dev.php
@@ -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()">↺</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;
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user