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
a99f376f
Commit
a99f376f
authored
Jan 15, 2014
by
nextime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Well, fix a regression in a db query
parent
671c04f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
libraries.php
Web/includes/libraries.php
+11
-3
No files found.
Web/includes/libraries.php
View file @
a99f376f
...
...
@@ -89,8 +89,16 @@ function getSectionElements($section, $table='relay', $activeonly=true) {
/* NEW FUNCTIONS */
//$numnum=0;
function
getPanelIO
(
$table
,
$selector
,
$content
,
$websection
,
$activeonly
=
true
,
$where
=
""
,
$orderby
=
""
,
$limit
=
""
)
{
/*
global $numnum;
$numnum++;
print_r("\n");
print_r($numnum);
*/
if
(
$table
==
'input'
)
{
$dom
=
"inpname"
;
...
...
@@ -222,7 +230,7 @@ function getPanelIO($table, $selector, $content, $websection, $activeonly=true,
$ret
[
$k
][
'inputs'
]
=
array
();
$ret
[
$k
][
'analogs'
]
=
array
();
if
(
intval
(
$row
[
'has_relays'
])
>
0
)
{
$ret
[
$k
][
'relays'
]
=
getPanelIO
(
'relay'
,
$ret
[
$k
][
'domain'
],
$websection
,
$activeonly
,
$ret
[
$k
][
'relays'
]
=
getPanelIO
(
'relay'
,
$
selector
,
$
ret
[
$k
][
'domain'
],
$websection
,
$activeonly
,
"relay.board_ip='"
.
$row
[
'board_ip'
]
.
"' AND relay.outnum='"
.
$row
[
'outnum'
]
.
"' and relay.outtype='"
.
$row
[
'outtype'
]
.
"'"
,
"position,button_name"
);
}
...
...
@@ -241,9 +249,9 @@ function getPanelIO($table, $selector, $content, $websection, $activeonly=true,
}
$wheredomain_inp
.=
")"
;
$wheredomain_ana
.=
")"
;
$ret
[
$k
][
'inputs'
]
=
getPanelIO
(
'input'
,
""
,
"*"
,
$activeonly
,
$ret
[
$k
][
'inputs'
]
=
getPanelIO
(
'input'
,
$selector
,
""
,
"*"
,
$activeonly
,
$wheredomain_inp
,
"id"
,
$limit
);
$ret
[
$k
][
'analogs'
]
=
getPanelIO
(
'analog'
,
""
,
"*"
,
$activeonly
,
$ret
[
$k
][
'analogs'
]
=
getPanelIO
(
'analog'
,
$selector
,
""
,
"*"
,
$activeonly
,
$wheredomain_ana
,
"id"
,
$limit
);
}
...
...
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