'grandstream_left','panel_websections'=>'_grandstream_left','panel_type'=>'gxv3175_left', 'panel_content'=>'','panel_selector'=>'any')+$PANELDEFAULTS; $DEFPANELS[]=array('panel_title'=>'grandstream_center','panel_websections'=>'_grandstream_center','panel_type'=>'gxv3175_center', 'panel_content'=>'','panel_selector'=>'any')+$PANELDEFAULTS; $DEFPANELS[]=array('panel_title'=>'grandstream_right','panel_websections'=>'_grandstream_right','panel_type'=>'gxv3175_right', 'panel_content'=>'','panel_selector'=>'any')+$PANELDEFAULTS; $colors=array( 'gray' => 'pure-button-active', 'blue' => 'pure-button-primary', 'azure' => 'pure-button-secondary', 'green' => 'pure-button-success', 'red' => 'pure-button-error', 'orange' => 'pure-button-warning' ); $panels=DB::query("SELECT * FROM user_gui_panels WHERE user='$_DOMOTIKA[username]' AND page='gmi' ORDER by panel_position,id"); if(!$panels or count($panels)<1) { $panels=$DEFPANELS; foreach($panels as $p) { $q="INSERT INTO user_gui_panels (user,page,panel_title,panel_type,panel_cols,panel_height,panel_visible,panel_position,panel_sections,panel_websections,panel_selector,panel_content) VALUES ('".$_DOMOTIKA['username']."','gmi','".$p['panel_title']."','".$p['panel_type']."', '".$p['panel_cols']."','".$p['panel_height']."','".$p['panel_visible']."','".$p['panel_position']."', '".$p['panel_sections']."','".$p['panel_websections']."','".$p['panel_selector']."','".$p['panel_content']."')"; DB::query($q); } } foreach($panels as $panel) { switch($panel['panel_type']) { case 'gxv3175_left': $buttonar_left=getPanelButtons($_DOMOTIKA['username'], $panel['panel_content'], $panel['panel_sections'], $panel['panel_websections'], $panel['panel_selector'],true,7); break; case 'gxv3175_center': $buttonar_center=DB::query("SELECT button_name,screenshot,audiostream FROM mediasources WHERE websection='citophone' AND active=1 ORDER BY position,id"); // AND DMDOMAIN(button_name, '".$panel['panel_content']."')=1 break; case 'gxv3175_right': $buttonar_right=getPanelButtons($_DOMOTIKA['username'], $panel['panel_content'], $panel['panel_sections'], $panel['panel_websections'], $panel['panel_selector'],true,7); break; } } ?> Domotika GMI Interface