2017-12-04 18:22:58 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class Production extends Vn\Web\JsonRequest
|
|
|
|
{
|
|
|
|
const PARAMS = ['deviceId'];
|
|
|
|
|
|
|
|
function run ($db)
|
|
|
|
{
|
|
|
|
$row = $db->getObject (
|
2017-12-20 11:34:04 +00:00
|
|
|
'SELECT displayText FROM vn.routeGate WHERE deviceId = #',
|
2017-12-04 18:22:58 +00:00
|
|
|
[$_REQUEST['deviceId']]
|
|
|
|
);
|
|
|
|
|
|
|
|
if (!isset($row))
|
|
|
|
throw new Vn\Lib\UserException ('Device not found');
|
|
|
|
|
|
|
|
return $row->displayText;
|
|
|
|
}
|
|
|
|
}
|