Commit a302bbb1 authored by nextime's avatar nextime

gxv3175 gmi interface adapted to the user_gui_panels structure

parent a163a50e
ALTER TABLE `user_gui_panels` CHANGE `page` `page` ENUM( 'actuations', 'video', 'cameras', 'gmi' ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'actuations';
ALTER TABLE `user_gui_panels` CHANGE `panel_type` `panel_type` ENUM( 'standard', 'macrobuttons', 'bookmarks', 'cameras', 'video', 'gxv3175_left', 'gxv3175_center', 'gxv3175_right' ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 'standard';
<?
include_once("common_includes.php");
$buttonar_left=getPanelButtons($_DOMOTIKA['username'], "*","*","_grandstream_left", "dmdomain","true",7);
$buttonar_right=getPanelButtons($_DOMOTIKA['username'], "*","*","_grandstream_right", "dmdomain","true",7);
$DEFPANELS = array();
$DEFPANELS[]=array('panel_title'=>'grandstream_left','panel_websections'=>'_grandstream_left','panel_type'=>'gxv3175_left','panel_content'=>'*')+$PANELDEFAULTS;
$DEFPANELS[]=array('panel_title'=>'grandstream_center','panel_websections'=>'_grandstream_center','panel_type'=>'gxv3175_center','panel_content'=>'*')+$PANELDEFAULTS;
$DEFPANELS[]=array('panel_title'=>'grandstream_right','panel_websections'=>'_grandstream_right','panel_type'=>'gxv3175_right','panel_content'=>'*')+$PANELDEFAULTS;
$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=getPanelButtons($_DOMOTIKA['username'], $panel['panel_content'], $panel['panel_sections'], $panel['panel_websections'], $panel['panel_selector'],true,7);
break;
case 'gxv3175_right':
$buttonar_right=getPanelButtons($_DOMOTIKA['username'], $panel['panel_content'], $panel['panel_sections'], $panel['panel_websections'], $panel['panel_selector'],true,7);
break;
}
}
//$buttonar_left=getPanelButtons($_DOMOTIKA['username'], "*","*","_grandstream_left", "dmdomain","true",7);
//$buttonar_right=getPanelButtons($_DOMOTIKA['username'], "*","*","_grandstream_right", "dmdomain","true",7);
?>
<html>
<head>
......
......@@ -21,18 +21,6 @@ if(file_exists("$FSPATH/left/$GUISECTION.php"))
if(file_exists("$FSPATH/right/$GUISECTION.php"))
$right=TRUE;
$PANELDEFAULTS=array(
'panel_title'=>'',
'panel_cols'=>'4',
'panel_height'=>300,
'panel_type'=>'standard',
'panel_sections'=>'*',
'panel_websections'=>'*',
'panel_selector'=>'dmdomain',
'panel_content'=>'',
'panel_visible'=>'all'
);
$dmcolors=array(
'green' => 'success',
'orange' => 'warning',
......
<?
$PANELDEFAULTS=array(
'panel_title'=>'',
'panel_cols'=>'4',
'panel_height'=>300,
'panel_type'=>'standard',
'panel_sections'=>'*',
'panel_websections'=>'*',
'panel_selector'=>'dmdomain',
'panel_content'=>'',
'panel_visible'=>'all'
);
require_once("session.php");
require_once("HTTP/Request.php");
require_once("config.inc.php");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment