$listAllVisible = $result->mcVisible; $deviceallowed = $listAllVisible->ListDevice; $device = $deviceallowed->{$_GET['iddevice']}; echo '<div class="center">'; $display = ''; if (!empty($device->device_opt->{12})) { $display .= display_OnOff($device); $display .= '<br/>'; $display .= '<div class="clearfix"></div>'; } if (!empty($device->device_opt->{442})) { $display .= '<div class="col-lg-offset-3 col-lg-6 col-md-offset-2 col-md-8 col-sm-offset-1 col-sm-10 col-xs-12">'; $display .= display_varie($device, 3, 442); $display .= '</div>'; $display .= '<div class="clearfix"></div>'; } if (!empty($device->device_opt->{54})) { $display .= display_UpDown($device); $display .= '<div class="clearfix"></div>'; } if (!empty($device->device_opt->{13})) { $display .= '<div class="col-lg-offset-3 col-lg-6 col-md-offset-2 col-md-8 col-sm-offset-1 col-sm-10 col-xs-12">'; $display .= display_varie($device, 2); $display .= '</div>'; $display .= '<div class="clearfix"></div><br/>'; } $display = strtr($display, "\n", ''); echo $display; echo '<div class="clearfix"></div><br/>'; echo '<button onclick="popup_close()" class="btn btn-danger">' . _('Close') . ' <span class="glyphicon glyphicon-remove"></span></button>' . '</div>'; }
function display_lampe($info) { if (!empty($info->device_id) && $info->device_id == 3) { $display = '<div class="info-widget"> <button title="' . _('More') . '" onclick="HandlePopup(3, ' . $info->room_device_id . ')" class="btn btn-greenleaf" type="button"> <span class="fa fa-info-circle md"></span> </button> </div> <h3 class="title">' . $info->name . '</h3>'; } else { $display = '<div class="info-widget"><button title="' . _('More') . '" onclick="HandlePopup(2, ' . $info->room_device_id . ')" class="btn btn-greenleaf" type="button"><span class="fa fa-info-circle md"></span></button></div> <h3 class="title">' . $info->name . '</h3>'; } if (!empty($info->device_opt->{12})) { $display .= display_OnOff($info); } if (!empty($info->device_opt->{13})) { $display .= display_varie($info); } $display .= display_ChromatiqueWheel($info); return $display; }
function display_lampe($info) { $display = ''; if (!empty($info->device_id) && $info->device_id == 85) { $display .= '<div class="info-widget foreground-widget">'; $display .= '<button title="' . _('More') . '" onclick="popupChromaWheel(' . $info->room_device_id . ', 0, 0)" class="btn btn-greenleaf" type="button">'; $display .= '<span class="fa fa-plus md"></span>'; $display .= '</button> </div>'; } elseif (!empty($info->device_id) && !empty($info->device_opt->{153})) { $display .= '<div class="info-warning foreground-widget"> <button id="widget_info-' . $info->room_device_id . '-153" title="' . _('More') . '" onclick="HandlePopup(2, ' . $info->room_device_id . ')"'; if ($info->device_opt->{153}->opt_value == 1) { $display .= ' class="btn btn-danger"'; } else { $display .= ' class="btn btn-greenleaf"'; } $display .= ' type="button"> <span class="fa fa-info-circle md"></span> </button> </div>'; } if ($info->device_id == 85 || !empty($info->device_opt->{153})) { $display .= '<h3 class="title foreground-widget">' . $info->name . '</h3>'; } else { $display .= '<h3 class="title margin-top foreground-widget">' . $info->name . '</h3>'; } if (!empty($info->device_opt->{12})) { $display .= display_OnOff($info); } if (!empty($info->device_opt->{13})) { $display .= display_varie($info); } return $display; }