clima.php 1.81 KB
Newer Older
nextime's avatar
nextime committed
1
<? @include_once("../includes/common.php"); ?>
2
   <div class="insider">
nextime's avatar
nextime committed
3 4
<?

5 6
$paneldimensions=array('dimensions' => array(4 => '50%'));
$SHOW_EMPTY_PANELS=FALSE;
nextime's avatar
nextime committed
7

nextime's avatar
nextime committed
8 9
$panels = array();

10 11
if($GUISUBSECTION=="")
{
nextime's avatar
nextime committed
12

13 14 15 16 17 18 19 20 21 22 23 24
   $panels[]=array('panel_title'=>$tr->Get('clima')." - ".$tr->Get("Actions"),'panel_sections'=>'actions',
                  'panel_websections'=>'clima','panel_cols'=>4, 'panel_height'=>'100%')+$PANELDEFAULTS;

   $panels[]=array('panel_title'=>$tr->Get('clima')." - ".$tr->Get("Outputs"),'panel_sections'=>'output',
                  'panel_websections'=>'clima','panel_cols'=>4, 'panel_height'=>'100%')+$PANELDEFAULTS;

   $panels[]=array('panel_title'=>$tr->Get('clima')." - ".$tr->Get("Inputs"),'panel_sections'=>'input',
                  'panel_websections'=>'clima','panel_cols'=>4, 'panel_height'=>'100%')+$PANELDEFAULTS+$paneldimensions;

   $panels[]=array('panel_title'=>$tr->Get('clima')." - ".$tr->Get("Analogs"),'panel_sections'=>'analog',
                  'panel_websections'=>'clima','panel_cols'=>4, 'panel_height'=>'100%')+$PANELDEFAULTS+$paneldimensions;
} else {
nextime's avatar
nextime committed
25

nextime's avatar
nextime committed
26
   $thermostats=DB::query("SELECT * from thermostats WHERE name=%s AND active='yes'", $GUISUBSECTION);
nextime's avatar
nextime committed
27 28
   foreach($thermostats as $t)
   {
nextime's avatar
nextime committed
29
      $panels[]=array('panel_title'=>$t['button_name'],'panel_sections'=>$t['sensor_type'], 'panel_websections'=>'clima', 
nextime's avatar
nextime committed
30
                      'panel_type'=>'thermostat', 'panel_content'=>$t['name'],'panel_cols'=>5, 'panel_height'=>'80%')+$PANELDEFAULTS;   
nextime's avatar
nextime committed
31 32 33
      $panels[]=array('panel_title'=>'programmazione '.$t['button_name'],'panel_sections'=>$t['sensor_type'], 'panel_websections'=>'clima',
                      'panel_type'=>'thermostat_program', 'panel_content'=>$t['name'],'panel_cols'=>5, 'panel_height'=>'80%')+$PANELDEFAULTS;

nextime's avatar
nextime committed
34
   }
nextime's avatar
nextime committed
35 36 37
}
include($FSPATH."/panels/include.php");
?>
38
   </div> <!-- insider -->