2024-10-06 00:49:03 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use \App\Services\{Auth, DB, Date};
|
|
|
|
use \App\Models\Vehicle;
|
|
|
|
|
|
|
|
$id = explode('/', $_SERVER['REQUEST_URI'])[2];
|
2024-10-15 20:39:44 +03:00
|
|
|
$data = DB::query('SELECT * FROM entities_data WHERE id=:id', array(':id' => $id))[0];
|
|
|
|
$vehicle = new Vehicle($data['entityid']);
|
|
|
|
|
|
|
|
$vehicledatavariables = json_decode($data['content'], true);
|
|
|
|
|
2024-10-06 00:49:03 +03:00
|
|
|
|
|
|
|
?>
|
|
|
|
|
2024-09-14 23:55:42 +03:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="ru">
|
|
|
|
|
|
|
|
<head>
|
2024-10-15 20:39:44 +03:00
|
|
|
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/LoadHead.php'); ?>
|
2024-09-14 23:55:42 +03:00
|
|
|
|
|
|
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<div id="backgr"></div>
|
|
|
|
<table class="tmain">
|
|
|
|
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/Navbar.php'); ?>
|
|
|
|
<tr>
|
|
|
|
<td class="main">
|
2024-10-15 20:39:44 +03:00
|
|
|
<h1><?= $data['title'] ?></h1>
|
|
|
|
|
2024-09-14 23:55:42 +03:00
|
|
|
<table class="horlines">
|
|
|
|
<col width="150">
|
|
|
|
<col>
|
2024-10-06 00:49:03 +03:00
|
|
|
<?php
|
|
|
|
$vehiclevariables = json_decode($vehicle->getvehicle('sampledata'), true);
|
2024-10-15 20:39:44 +03:00
|
|
|
$num = 1;
|
2024-10-06 00:49:03 +03:00
|
|
|
foreach ($vehiclevariables as $vb) {
|
2024-10-15 20:39:44 +03:00
|
|
|
echo '<tr class="h21"><td class="ds nw">' . $vb['name'] . ':</td><td class="d"><b>' . $vehicledatavariables[$num]['value'] . '</b></td></tr>';
|
|
|
|
$num++;
|
2024-10-06 00:49:03 +03:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
2024-10-15 20:39:44 +03:00
|
|
|
|
2024-09-14 23:55:42 +03:00
|
|
|
</table><br>
|
2024-10-15 20:39:44 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
2024-09-14 23:55:42 +03:00
|
|
|
<tr>
|
|
|
|
|
2024-10-15 20:39:44 +03:00
|
|
|
<?php include($_SERVER['DOCUMENT_ROOT'] . '/views/components/Footer.php'); ?>
|
2024-09-14 23:55:42 +03:00
|
|
|
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|