Use Monitor class instead of old sql
parent
f2065e2fcb
commit
e6c9830728
|
@ -246,13 +246,14 @@ if ( !empty($action) )
|
|||
if ( !empty($_REQUEST['mid']) && canView( 'Control', $_REQUEST['mid'] ) )
|
||||
{
|
||||
require_once( 'control_functions.php' );
|
||||
require_once( 'Monitor.php' );
|
||||
$mid = validInt($_REQUEST['mid']);
|
||||
if ( $action == "control" )
|
||||
{
|
||||
$monitor = dbFetchOne( "select C.*,M.* from Monitors as M inner join Controls as C on (M.ControlId = C.Id) where M.Id = ?", NULL, array($mid) );
|
||||
$monitor = new Monitor( $mid );
|
||||
|
||||
$ctrlCommand = buildControlCommand( $monitor );
|
||||
sendControlCommand( $monitor['Id'], $ctrlCommand );
|
||||
sendControlCommand( $monitor->Id(), $ctrlCommand );
|
||||
}
|
||||
elseif ( $action == "settings" )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue