Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
domotikad
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
domotika
domotikad
Commits
a302bbb1
Commit
a302bbb1
authored
Dec 22, 2013
by
nextime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gxv3175 gmi interface adapted to the user_gui_panels structure
parent
a163a50e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
14 deletions
+51
-14
80-gmi.sql
Databases/createdb/80-gmi.sql
+2
-0
index.php
Web/htdocs/gmi/index.php
+36
-2
common.php
Web/htdocs/gui/includes/common.php
+0
-12
common_includes.php
Web/includes/common_includes.php
+13
-0
No files found.
Databases/createdb/80-gmi.sql
0 → 100644
View file @
a302bbb1
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'
;
Web/htdocs/gmi/index.php
View file @
a302bbb1
<?
<?
include_once
(
"common_includes.php"
);
include_once
(
"common_includes.php"
);
$buttonar_left
=
getPanelButtons
(
$_DOMOTIKA
[
'username'
],
"*"
,
"*"
,
"_grandstream_left"
,
"dmdomain"
,
"true"
,
7
);
$DEFPANELS
=
array
();
$buttonar_right
=
getPanelButtons
(
$_DOMOTIKA
[
'username'
],
"*"
,
"*"
,
"_grandstream_right"
,
"dmdomain"
,
"true"
,
7
);
$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>
<html>
<head>
<head>
...
...
Web/htdocs/gui/includes/common.php
View file @
a302bbb1
...
@@ -21,18 +21,6 @@ if(file_exists("$FSPATH/left/$GUISECTION.php"))
...
@@ -21,18 +21,6 @@ if(file_exists("$FSPATH/left/$GUISECTION.php"))
if
(
file_exists
(
"
$FSPATH
/right/
$GUISECTION
.php"
))
if
(
file_exists
(
"
$FSPATH
/right/
$GUISECTION
.php"
))
$right
=
TRUE
;
$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
(
$dmcolors
=
array
(
'green'
=>
'success'
,
'green'
=>
'success'
,
'orange'
=>
'warning'
,
'orange'
=>
'warning'
,
...
...
Web/includes/common_includes.php
View file @
a302bbb1
<?
<?
$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
(
"session.php"
);
require_once
(
"HTTP/Request.php"
);
require_once
(
"HTTP/Request.php"
);
require_once
(
"config.inc.php"
);
require_once
(
"config.inc.php"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment