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
53b5855f
Commit
53b5855f
authored
Jan 26, 2014
by
nextime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better integration for stats gui section
parent
cca71e7f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
2 deletions
+56
-2
stats.php
Web/htdocs/gui/left/stats.php
+15
-0
stats.php
Web/htdocs/gui/pages/stats.php
+39
-2
clima.php
Web/htdocs/gui/right/clima.php
+1
-0
index.php
Web/htdocs/gui/right/index.php
+1
-0
No files found.
Web/htdocs/gui/left/stats.php
0 → 100644
View file @
53b5855f
<?
@
include_once
(
"../includes/common.php"
);
?>
<div
class=
"left-drawer"
>
<div
id=
"websectionlist"
class=
"panel drawer-container scrollable"
>
<a
href=
"
<?=
$BASEGUIPATH
.
"/stats"
?>
"
class=
"btn btn-block btn-default"
>
Stats Home
</a>
<?
$l
=
DB
::
query
(
"SELECT websection FROM stats_charts WHERE websection!='home' group by websection order by websection"
);
foreach
(
$l
as
$k
=>
$v
)
{
?>
<a
href=
"
<?=
$BASEGUIPATH
.
"/stats/"
.
$v
[
'websection'
]
?>
"
class=
"btn btn-block btn-default"
>
<?=
$v
[
'websection'
]
?>
</a>
<?
}
?>
</div>
</div>
Web/htdocs/gui/pages/stats.php
View file @
53b5855f
<?
@
include_once
(
"../includes/common.php"
);
?>
<?
@
include_once
(
"../includes/common.php"
);
?>
<div
class=
"row insider"
>
<div
class=
"row insider"
>
<iframe
width=
"100%"
height=
"100%"
src=
"/domotika/stats/"
>
<?
</iframe>
$panels
=
FALSE
;
if
(
$GUISUBSECTION
!=
""
&&
is_numeric
(
$GUISUBSECTION
))
{
$v
=
DB
::
query
(
"SELECT * FROM stats_charts WHERE websection='
$GUISUBSECTION
' AND active=1 order by webposition,id"
);
if
(
is_array
(
$v
)
&&
count
(
$v
)
>
0
)
{
$panels
=
array
();
$pos
=
1
;
foreach
(
$v
as
$pan
)
{
$panels
[]
=
array
(
'panel_title'
=>
"Stats
$GUISUBSECTION
"
,
'panel_type'
=>
'graph'
,
'panel_content'
=>
'*'
,
'panel_websections'
=>
"
$GUISUBSECTION
"
,
'panel_cols'
=>
'12'
,
'panel_height'
=>
'100%'
)
+
$PANELDEFAULTS
;
$pos
++
;
}
}
}
$DEFPANELS
=
array
();
$DEFPANELS
[]
=
array
(
'panel_title'
=>
'Default stats'
,
'panel_type'
=>
'graph'
,
'panel_content'
=>
'*'
,
'panel_websections'
=>
'home'
,
'panel_cols'
=>
'12'
,
'panel_height'
=>
'100%'
)
+
$PANELDEFAULTS
;
if
(
!
$panels
)
$panels
=
DB
::
query
(
"SELECT * FROM user_gui_panels WHERE user='
$_DOMOTIKA[username]
' AND page='stats' 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'
]
.
"','stats','"
.
$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
);
}
}
include
(
$FSPATH
.
"/panels/include.php"
);
?>
</div>
<!-- row -->
</div>
<!-- row -->
Web/htdocs/gui/right/clima.php
0 → 120000
View file @
53b5855f
index
.
php
\ No newline at end of file
Web/htdocs/gui/right/index.php
View file @
53b5855f
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
<div
id=
"websectionlist"
class=
"panel drawer-container scrollable"
>
<div
id=
"websectionlist"
class=
"panel drawer-container scrollable"
>
<div
class=
"panel-heading"
><h2
class=
"panel-title"
>
Menu
</h2></div>
<div
class=
"panel-heading"
><h2
class=
"panel-title"
>
Menu
</h2></div>
<a
href=
"
<?=
$BASEGUIPATH
.
"/"
?>
"
class=
"btn btn-block btn-default rightbtn rightbtn-attuazioni"
>
Attuazioni
</a>
<a
href=
"
<?=
$BASEGUIPATH
.
"/"
?>
"
class=
"btn btn-block btn-default rightbtn rightbtn-attuazioni"
>
Attuazioni
</a>
<a
href=
"
<?=
$BASEGUIPATH
.
"/"
?>
"
class=
"btn btn-block btn-default rightbtn rightbtn-clima"
>
Clima
</a>
<a
href=
"
<?=
$BASEGUIPATH
.
"/video"
?>
"
class=
"btn btn-block btn-default rightbtn rightbtn-tv"
>
Video
&
TV
</a>
<a
href=
"
<?=
$BASEGUIPATH
.
"/video"
?>
"
class=
"btn btn-block btn-default rightbtn rightbtn-tv"
>
Video
&
TV
</a>
<a
href=
"
<?=
$BASEGUIPATH
.
"/cameras"
?>
"
class=
"btn btn-block btn-default rightbtn rightbtn-video"
>
Telecamere
</a>
<a
href=
"
<?=
$BASEGUIPATH
.
"/cameras"
?>
"
class=
"btn btn-block btn-default rightbtn rightbtn-video"
>
Telecamere
</a>
<a
href=
"
<?=
$BASEGUIPATH
.
"/stats"
?>
"
class=
"btn btn-block btn-default rightbtn rightbtn-stats"
>
Stats
</a>
<a
href=
"
<?=
$BASEGUIPATH
.
"/stats"
?>
"
class=
"btn btn-block btn-default rightbtn rightbtn-stats"
>
Stats
</a>
...
...
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