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; }
<div class="titleOnCard"> Choose a plant for <?php if (!empty($friend)) { echo $friend->name; } else { echo "a friend"; } ?> </div> <div><img src="/img/filter.png"/></div> <div class="row"> <div class="large-12 columns"> <?php $plants = getPlants(); while ($plant = array_shift($plants)) { ?> <div class="panel"> <div class="row"> <div class="large-1 small-12 columns centerAlign"> <img src="<?php echo getPlantImage($plant->id); ?> "/> </div> <div class="large-11 small-0 columns"> <div class="name"><?php echo $plant->name;
<?php require_once realpath(dirname(__FILE__)) . "/../lego/DatabaseLego.php"; require_once realpath(dirname(__FILE__)) . "/../users/models/config.php"; require_once realpath(dirname(__FILE__)) . "/../lego/DashboardLego.php"; require_once realpath(dirname(__FILE__)) . "/../lego/UserCakeLego.php"; // Dashboard page ?> <ul class="dashboard"> <?php getPlants($loggedInUser->user_id); ?> </ul>