function get($lastmodified, $api) { $sync = new Sync(); $output = array(); if ($lastmodified < $sync->get(Sync::USER)) { $output[Sync::USER] = getUser($api); } if ($lastmodified < $sync->get(Sync::SCENARIOS)) { $output[Sync::SCENARIOS] = getScenarios(); } if ($lastmodified < $sync->get(Sync::LIGHTS)) { $output[Sync::LIGHTS] = getLights(); } if ($lastmodified < $sync->get(Sync::ROOMS)) { $output[Sync::ROOMS] = getRooms(); } if ($lastmodified < $sync->get(Sync::PLANTS)) { $output[Sync::PLANTS] = getPlants(); } if ($lastmodified < $sync->get(Sync::DEVICES)) { $output[Sync::DEVICES] = getDevices(); } if ($lastmodified < $sync->get(Sync::SENSORS)) { $output[Sync::SENSORS] = getSensors(); } if ($lastmodified < $sync->get(Sync::EAN)) { $output[Sync::EAN] = getEan(); } return $output; }
<tbody><tr> <td align="left" class="textHeaderDark"> </td> <td align="left" class="textHeaderDark"> <div class="toolmenu"> <ul> <li><a class="rigth" href="management.php?New=Sensor">[+] Add New Sensor</a></li> </ul> </div> </td> </tr></tbody> </table> </div> <?php $sensors = getSensors(); if (count($sensors[0]) == 0) { print "<br>Please, add a new sensor."; } else { print "<table id=\"ManagementTable\">"; print "<tr>"; print "<th width=\"350\" align=\"left\">Sensor Details</th>"; if ($_SESSION['getSensorInfo'] == true) { print "<th width=\"450\" align=\"left\">Info/Stats (<a href=\"?sensorInfo=0\">disable load of this sensor info</a>)</th>"; } else { print "<th width=\"450\" align=\"left\">Info/Stats (<a href=\"?sensorInfo=1\">enable load of this sensor info</a>)</th>"; } print "<th width=\"200\" align=\"left\"></th>"; print "</tr>"; foreach ($sensors[0] as $sensor) { if ($_SESSION['getSensorInfo'] == true) {